1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-11 02:57:18 +08:00

Fix API room host not being populated

This commit is contained in:
Dan Balasescu 2025-02-28 15:52:02 +09:00
parent 306b30cb12
commit a09ef5d96d
No known key found for this signature in database

View File

@ -222,6 +222,8 @@ namespace osu.Game.Online.Multiplayer
{
// Populate users.
await PopulateUsers(joinedRoom.Users).ConfigureAwait(false);
if (joinedRoom.Host != null)
await PopulateUsers([joinedRoom.Host]).ConfigureAwait(false);
// Update the stored room (must be done on update thread for thread-safety).
await runOnUpdateThreadAsync(() =>
@ -233,6 +235,7 @@ namespace osu.Game.Online.Multiplayer
APIRoom = apiRoom;
APIRoom.RoomID = joinedRoom.RoomID;
APIRoom.Host = joinedRoom.Host?.User;
APIRoom.Playlist = joinedRoom.Playlist.Select(item => new PlaylistItem(item)).ToArray();
APIRoom.CurrentPlaylistItem = APIRoom.Playlist.Single(item => item.ID == joinedRoom.Settings.PlaylistItemId);
// The server will null out the end date upon the host joining the room, but the null value is never communicated to the client.