Add profile photo uploads and custom difficulty support
This commit is contained in:
@@ -102,11 +102,20 @@ async function announcementSource(
|
||||
);
|
||||
hostName = profile.display_name;
|
||||
}
|
||||
const difficultySettings =
|
||||
room.difficulty_settings &&
|
||||
typeof room.difficulty_settings === "object" &&
|
||||
!Array.isArray(room.difficulty_settings)
|
||||
? room.difficulty_settings
|
||||
: null;
|
||||
return {
|
||||
id: room.id,
|
||||
name: map.data.name,
|
||||
owner: hostName,
|
||||
difficulty: room.difficulty,
|
||||
difficulty:
|
||||
typeof difficultySettings?.name === "string"
|
||||
? difficultySettings.name
|
||||
: room.difficulty,
|
||||
players: players.length,
|
||||
limit: room.player_limit,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user