mirror of
https://github.com/ppy/osu.git
synced 2025-03-11 05:17:25 +08:00
Fix API room host not being populated
This commit is contained in:
parent
306b30cb12
commit
a09ef5d96d
@ -222,6 +222,8 @@ namespace osu.Game.Online.Multiplayer
|
|||||||
{
|
{
|
||||||
// Populate users.
|
// Populate users.
|
||||||
await PopulateUsers(joinedRoom.Users).ConfigureAwait(false);
|
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).
|
// Update the stored room (must be done on update thread for thread-safety).
|
||||||
await runOnUpdateThreadAsync(() =>
|
await runOnUpdateThreadAsync(() =>
|
||||||
@ -233,6 +235,7 @@ namespace osu.Game.Online.Multiplayer
|
|||||||
APIRoom = apiRoom;
|
APIRoom = apiRoom;
|
||||||
|
|
||||||
APIRoom.RoomID = joinedRoom.RoomID;
|
APIRoom.RoomID = joinedRoom.RoomID;
|
||||||
|
APIRoom.Host = joinedRoom.Host?.User;
|
||||||
APIRoom.Playlist = joinedRoom.Playlist.Select(item => new PlaylistItem(item)).ToArray();
|
APIRoom.Playlist = joinedRoom.Playlist.Select(item => new PlaylistItem(item)).ToArray();
|
||||||
APIRoom.CurrentPlaylistItem = APIRoom.Playlist.Single(item => item.ID == joinedRoom.Settings.PlaylistItemId);
|
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.
|
// The server will null out the end date upon the host joining the room, but the null value is never communicated to the client.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user