Exemplo n.º 1
0
 private async Task SendConversationMessageItemChangedNotificationAsync(int conversationId, int messageId, MessageChangeType type)
 {
     var userIds = (await _conversationQueryService.GetAllConversationUserIdsAsync(conversationId)).ToList();
     await _notificationService.SendConversationMessageItemChangedNotificationAsync(userIds, conversationId, type, messageId);
 }
Exemplo n.º 2
0
 private async Task SendChannelMessageItemChangedNotificationAsync(int channelId, int messageId, MessageChangeType type)
 {
     var userIds = (await _channelQueryService.GetAllChannelUserIdsAsync(channelId)).ToList();
     await _notificationService.SendChannelMessageItemChangedNotificationAsync(userIds, channelId, type, messageId);
 }
Exemplo n.º 3
0
 public async Task SendConversationMessageItemChangedNotificationAsync(IEnumerable <int> userIds, int conversationId, MessageChangeType type, int messageId)
 {
     foreach (var userId in userIds)
     {
         await _hubContext.Clients.User(userId.ToString()).SendAsync("ConversationMessageItemChanged", conversationId, type, messageId);
     }
 }