Exemple #1
0
        private void RemoveAllChatUsers(Models.Chat chat, Models.Group group)
        {
            var chatUsers = _chatUserRepository.GetAllByChatId(chat.Id);

            _chatUserRepository.RemoveAllByChatId(chat.Id);
            _chatUserStore.RemoveAllByChatId(chat.Id);

            foreach (var chatUser in chatUsers)
            {
                _chatEventService.AddUserRemovedFromChatEvent(group, _authorizedUser, chatUser.User, chat);
            }
        }