1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-22 00:07:19 +08:00

Fix password in a better way

This commit is contained in:
smoogipoo 2021-08-17 09:40:25 +09:00
parent c4a42c4db0
commit 1e282432c9
2 changed files with 3 additions and 2 deletions

View File

@ -60,7 +60,8 @@ namespace osu.Game.Screens.OnlinePlay.Components
AddOrUpdateRoom(result);
room.CopyFrom(result); // Also copy back to the source model, since this is likely to have been stored elsewhere.
onSuccess?.Invoke(result);
// The server may not contain all properties (such as password), so invoke success with the given room.
onSuccess?.Invoke(room);
};
req.Failure += exception =>

View File

@ -19,7 +19,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
private MultiplayerClient multiplayerClient { get; set; }
public override void CreateRoom(Room room, Action<Room> onSuccess = null, Action<string> onError = null)
=> base.CreateRoom(room, r => joinMultiplayerRoom(r, room.Password.Value, onSuccess, onError), onError);
=> base.CreateRoom(room, r => joinMultiplayerRoom(r, r.Password.Value, onSuccess, onError), onError);
public override void JoinRoom(Room room, string password = null, Action<Room> onSuccess = null, Action<string> onError = null)
{