This commit is contained in:
Robin Appelman 2026-11-12 16:58:32 +01:00
commit b03d328ab9
Signed by: robin
SSH key fingerprint: SHA256:kifqgrqnut7q1YUIrI0AdMNC23qiKAS/T9uGFmIYvbE
19 changed files with 1081 additions and 978 deletions

View file

@ -49,7 +49,8 @@ impl FromStr for Location {
#[derive(Debug, Default, Serialize, PartialEq)]
pub struct LobbyLeader {
name: String,
steam_id: SteamID,
#[serde(with = "super::serde_steamid::opt")]
steam_id: Option<SteamID>,
}
impl FromStr for LobbyLeader {
@ -60,7 +61,7 @@ impl FromStr for LobbyLeader {
if let Ok(steam_id) = steam_id.trim_end_matches(')').parse::<u64>() {
Ok(LobbyLeader {
name: name.into(),
steam_id: steam_id.into(),
steam_id: SteamID::from_steam64(steam_id).ok(),
})
} else {
Err(LobbySettingsError::MalformedLeader(s.into()))