private async Task <Chatroom> CreateOrUpdate(Chatroom chatroom)
        {
            try
            {
                _chatroomRepository.CreateOrUpdateChatroom(chatroom);
            }
            catch (ChatroomUpdateException)
            {
                _chatroomRepository.CreateOrUpdateChatroom(chatroom);
            }

            await SendCreateChatroomMessage(chatroom);

            return(_chatroomRepository.GetChatroomById(chatroom.Id));
        }
Exemple #2
0
        public IHttpActionResult GetChatroom([FromUri] int id)
        {
            var chatroom = _chatroomRepository.GetChatroomById(id);

            return(Ok(chatroom));
        }