public static Room Get(int currentUserId, int otherUserId, string otherUserName) { var room = new Room (GetRoomId(currentUserId, otherUserId), otherUserName); room.UserId = otherUserId; return room; }
public async Task<RoomData> JoinPublicRoom(Room room) { if (!Rooms.Any (r => r.Value.Room.RoomId == room.RoomId)) { Rooms.CreateRoom (room); _updateBuilder.AddPublicRoom (room.RoomId); //Manually force update the chat, to send our message asap await GetChatUpdate (); } //Otherwise we already have the room in our active chats, nothing to do here return Rooms [room.RoomId]; }