public void LeaveRoom(string roomId) { var room = currentRooms.GetRoom(roomId); if (room == null) { return; } var member = room.Members.GetValueOrDefault(Context.Peer.ConnectionId); if (member == null) { return; } var reason = currentRooms.RemoveMember(roomId, Context.Peer.ConnectionId, null, out room); if (reason == RemoveRoomMemberReason.RemovedMember) { InRoomMembers(room).LeaveUser(member.Name); } }