public async Task UpdateChatRoom(UpdateChatRoomInput input)
        {
            var currentUserId = GetCurrentUserId();

            var chatRoom = await _chatRoomManager.GetAsync(input.Id);

            var participants = await _userRepository.GetAllListAsync(user => input.ParticipantIds.Contains(user.Id));

            _chatRoomManager.EditChatRoom(chatRoom, input.Name, currentUserId);
            _chatRoomManager.EditParticipants(chatRoom, participants, currentUserId);
        }
Example #2
0
        /// <summary>
        /// 返回SDK需要参数
        /// </summary>
        /// <returns></returns>
        internal UpdateChatRoomInput GetSdk()
        {
            var sdk = new UpdateChatRoomInput
            {
                roomId    = roomId,
                operateId = operateId,
                desc      = desc,
                remark    = remark,
                attr1     = attr1,
                attr2     = attr2,
                attr3     = attr3,
                roomName  = roomName,
                robotFlag = robotFlag,
                robotType = robotType
            };

            return(sdk);
        }