public void SendUnreadCounts(Dictionary <string, int> unreadCounts, string domain) { if (enableSignalr != "true" || !IsAvailable()) { return; } using (var service = new SignalrServiceClientWcf()) { if (service != null) { try { if (fromTeamlabToOnlyOffice == "true" && domain.EndsWith(fromServerInJid)) { int place = domain.LastIndexOf(fromServerInJid); if (place >= 0) { domain = domain.Remove(place, fromServerInJid.Length).Insert(place, toServerInJid); } } log.DebugFormat("SendUnreadCounts domain={0}", domain); service.SendUnreadCounts(unreadCounts, domain); } catch (Exception error) { ProcessError(error); } } } }
public void SendInvite(string chatRoomName, string calleeUserName, string domain) { if (enableSignalr != "true" || !IsAvailable()) { return; } using (var service = new SignalrServiceClientWcf()) { if (service != null) { try { if (fromTeamlabToOnlyOffice == "true" && domain.EndsWith(fromServerInJid)) { int place = domain.LastIndexOf(fromServerInJid); if (place >= 0) { domain = domain.Remove(place, fromServerInJid.Length).Insert(place, toServerInJid); } } log.DebugFormat("Send Invite chatRoomName={0}, calleeUserName={1}, domain={2}", chatRoomName, calleeUserName, domain); service.SendInvite(chatRoomName, calleeUserName, domain); } catch (Exception error) { ProcessError(error); } } } }
public void SendState(string from, byte state, int tenantId, string domain) { if (enableSignalr != "true" || !IsAvailable()) { return; } using (var service = new SignalrServiceClientWcf()) { if (service != null) { try { if (fromTeamlabToOnlyOffice == "true" && domain.EndsWith(fromServerInJid)) { int place = domain.LastIndexOf(fromServerInJid); if (place >= 0) { domain = domain.Remove(place, fromServerInJid.Length).Insert(place, toServerInJid); } } log.DebugFormat("Send State from={0}, state={1}, tenantId={2}, domain={3}", from, state, tenantId, domain); service.SendState(from, state, tenantId, domain); } catch (Exception error) { ProcessError(error); } } } }
public void SendMailNotification(int tenant, string userId, int state) { if (enableSignalr != "true" || !IsAvailable()) { return; } using (var service = new SignalrServiceClientWcf()) { if (service != null) { try { log.Debug("Send Mail Notification"); service.SendMailNotification(tenant, userId, state); } catch (Exception error) { ProcessError(error); } } } }
public void SendUnreadUsers(Dictionary <int, HashSet <Guid> > unreadUsers) { if (enableSignalr != "true" || !IsAvailable()) { return; } using (var service = new SignalrServiceClientWcf()) { if (service != null) { try { log.Debug("Send Unread Users"); service.SendUnreadUsers(unreadUsers); } catch (Exception error) { ProcessError(error); } } } }
public void SendOfflineMessages(string callerUserName, List <string> users, int tenantId) { if (enableSignalr != "true" || !IsAvailable()) { return; } using (var service = new SignalrServiceClientWcf()) { if (service != null) { log.DebugFormat("SendOfflineMessages callerUserName={0}, tenantId={1}", callerUserName, tenantId); try { service.SendOfflineMessages(callerUserName, users, tenantId); } catch (Exception error) { ProcessError(error); } } } }
public void SendUnreadUser(int tenant, string userId) { try { if (enableSignalr != "true" || !IsAvailable()) { return; } using (var service = new SignalrServiceClientWcf()) { if (service != null) { log.Debug("Send Unread User"); service.SendUnreadUser(tenant, userId); } } } catch (Exception error) { ProcessError(error); } }