public void ReceiveMessage(SendMessageOptions sendMessageOptions) { var chatMessage = this.mapper.Map <ChatMessage>(sendMessageOptions); this.chatMessageService.AddChatMessage(chatMessage); ChatEventsConnector.OnReceiveMessage(chatMessage); }
public void UpdateChatPermission(AddOrUpdateChatPermissionOptions options) { var chatPermission = this.mapper.Map <ChatPermission>(options); if (this.userService.IsCurrentClientUser(options.ChatMemberLogin)) { this.userService.SaveClientChatPermission(chatPermission); } ChatEventsConnector.OnUpdateChatPermission(chatPermission); }
public void AddOrUpdateChat(CreateOrUpdateChatOptions options) { var chat = this.mapper.Map <Chat>(options); this.chatService.AddOrUpdateChat(chat); var chatPermissionOptions = (AddOrUpdateChatPermissionOptions)options.ExtraData; var chatPermission = this.mapper.Map <ChatPermission>(chatPermissionOptions); this.userService.SaveClientChatPermission(chatPermission); ChatEventsConnector.OnAddOrUpdateChat(chat); ChatEventsConnector.OnUpdateChatPermission(chatPermission); }
public void RemoveMessage(int chatMessageId) { this.chatMessageService.DeleteMessage(chatMessageId); ChatEventsConnector.OnDeleteMessage(chatMessageId); }
public void RemoveChat(int chatId) { this.chatService.DeleteChat(chatId); ChatEventsConnector.OnDeleteChat(chatId); }