コード例 #1
0
        private async Task NotifyForNewConversationMessageAsync(int conversationId, int messageId, int userId, int workspaceId)
        {
            if (!await _conversationQueryService.IsSelfConversationAsync(conversationId, userId))
            {
                var userIds = (await _conversationQueryService.GetAllConversationUserIdsAsync(conversationId)).ToList();
                await _cacheService.AddUnreadConversationMessageForUsersAsync(conversationId, messageId, userIds, workspaceId);
            }

            await SendConversationMessageItemChangedNotificationAsync(conversationId, messageId, MessageChangeType.Added);
        }