public NewChatsNoticeHandler( CommunicationObject @object, NodeConnection nodeConnection, INodeNoticeService nodeNoticeService, IConversationsNoticeService conversationsNoticeService, ICrossNodeService crossNodeService) { notice = (CreateOrEditChatsNodeNotice)@object; this.nodeConnection = nodeConnection; this.nodeNoticeService = nodeNoticeService; this.conversationsNoticeService = conversationsNoticeService; this.crossNodeService = crossNodeService; }
public EditChatsNoticeHandler( CommunicationObject @object, NodeConnection nodeConnection, INodeNoticeService nodeNoticeService, IConversationsNoticeService conversationsNoticeService, ILoadChatsService loadChatsService, ICrossNodeService crossNodeService, ISystemMessagesService systemMessagesService) { notice = (CreateOrEditChatsNodeNotice)@object; this.nodeConnection = nodeConnection; this.nodeNoticeService = nodeNoticeService; this.conversationsNoticeService = conversationsNoticeService; this.loadChatsService = loadChatsService; this.crossNodeService = crossNodeService; this.systemMessagesService = systemMessagesService; }
public async void SendEditChatsNodeNoticeAsync(List <ChatVm> chats) { try { CreateOrEditChatsNodeNotice notice = new CreateOrEditChatsNodeNotice(Enums.NodeNoticeCode.EditChats, chats); List <long> nodesIds = new List <long>(); foreach (var chat in chats) { nodesIds.AddRange(chat.NodesId); } if (nodesIds.Any()) { nodesIds.Distinct(); await SendNoticeToNodesAsync(notice, nodesIds).ConfigureAwait(false); } } catch (Exception ex) { Logger.WriteLog(ex); } }