fix: Revert room-details DTO extras that broke room parsing

af0d7b6 added RankingContext/DataBlob/MaxPlayers/ToxmodEnabled to the
shared BuildRoomServerDetails (and DataBlobHash/Description to
BuildStudioSaveWire) to try to satisfy the 2023 SaveRoom commit-response
Dispose walk. The invented RankingContext object shape is rejected by
the strict room-details mapper, so GET rooms/{id} (and every room list
that shares the builder) failed with "Malformed Response" -> rooms
broke. The 2023 mappers validate value SHAPES, not just key presence, so
bolting unverified keys onto the shared room DTO is unsafe.

Reverts af0d7b6 code changes. Room saving remains functionally correct
(blob persists, fanout delivers); the SaveRoom success toast is left for
a separately-verified fix.
This commit is contained in:
Alexa
2026-07-08 20:33:39 +03:00
parent af0d7b6c20
commit 479ea273ea
2 changed files with 8 additions and 34 deletions
@@ -700,12 +700,6 @@ public class RoomsController(
ReferencedUnityAssetIds = Array.Empty<string>(),
DataBlob = dataBlob,
DataBlobName = dataBlob,
// DataBlobHash + Description are read by the save mapper
// (JKIFFPPAJNK / PELEHJLMKJO) that the SaveRoom commit
// response deserializes; omitting them leaves nulls the
// response Dispose walk trips on.
DataBlobHash = (string?)null,
Description = string.Empty,
PersistenceVersion = 41,
OMVersion = 0,
SavedByAccountId = room.CreatorPlayerId,
@@ -1984,26 +1978,6 @@ public class RoomsController(
},
PublishState = 0,
MaxPlayerCalculationMode = room.MaxPlayerCalculationMode,
// 2023's room-details mapper (FGCPNAACHIK / GLEGPFFPDBE) reads
// these top-level keys and its Dispose walk (NEOPBOMGIOG.
// FKDDCNLJOLF, reached via the SaveRoom commit response)
// dereferences them — a missing RankingContext object or the
// DataBlob/MaxPlayers/ToxmodEnabled scalars leaves a null the
// walk NREs on ("Failed to save room" toast despite a
// persisted save). Emit them so the room DTO round-trips
// through the strict save-response path, not just the
// include-masked GET rooms/{id} path.
DataBlob = dataBlobName,
DataBlobHash = (string?)null,
MaxPlayers = sceneRows is { Count: > 0 } ? sceneRows[0].MaxPlayers : room.MaxCapacity,
ToxmodEnabled = false,
RankingContext = new
{
RoomId = room.Id,
Score = 0.0,
Rank = 0,
RankingType = 0,
},
SubRooms = subRooms,
Roles = wireRoles,
LoadScreens = JsonArrayOrEmpty(room.LoadScreensJson),