mirror of https://github.com/ppy/osu
Fix incorrect HasPassword value for returned rooms
This commit is contained in:
parent
06ac3c1ad3
commit
3df4d1b0e6
|
@ -179,9 +179,15 @@ public void AddServerSideRoom(Room room, APIUser host)
|
|||
private Room createResponseRoom(Room room, bool withParticipants)
|
||||
{
|
||||
var responseRoom = cloneRoom(room);
|
||||
|
||||
// Password is hidden from the response, and is only propagated via HasPassword.
|
||||
bool hadPassword = responseRoom.HasPassword.Value;
|
||||
responseRoom.Password.Value = null;
|
||||
responseRoom.HasPassword.Value = hadPassword;
|
||||
|
||||
if (!withParticipants)
|
||||
responseRoom.RecentParticipants.Clear();
|
||||
|
||||
return responseRoom;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue