feat: Add support for 2018 client API endpoints and data models

- Implemented new search endpoints for rooms to accommodate the 2018 client.
- Added support for retrieving room details and featured rooms in a format compatible with the 2018 client.
- Introduced new data models for login responses and player presence specific to the 2018 client.
- Created mappers to convert between internal entities and the 2018 wire formats for players and rooms.
- Updated existing storefront APIs to include versioned endpoints for the 2018 client.
- Enhanced the version controller to return dual-format responses for compatibility with both 2018 and 2020 clients.
- Refactored the configuration service to ensure trailing slashes in URLs for the 2018 client.
This commit is contained in:
Alexa
2026-06-07 15:32:52 +03:00
parent 955246c6e4
commit 579071858a
21 changed files with 770 additions and 94 deletions
+6 -30
View File
@@ -839,37 +839,13 @@ public class RoomService(DorkNetDbContext db)
}
/// <summary>
/// Project a RoomEntity to the wire shape Room.Deserialize at RVA
/// 0x114E430 expects. Required keys (PascalCase):
/// RoomId, Name, Description, CreatorPlayerId, ImageName, State,
/// Accessibility, SupportsLevelVoting, IsAGRoom, CloningAllowed,
/// SupportsScreens, SupportsWalkVR, SupportsTeleportVR,
/// AllowsJuniors, RoomWarningMask, CustomRoomWarning
/// Optional: IsDormRoom, SupportsVRLow, SupportsMobile, DisableMicAutoMute.
/// Project a RoomEntity to the flat June-2018 wire room (RecNet
/// Room.Deserialize, RecNet.cs:78244). This branch is 2018-only, so every
/// room-returning endpoint emits this shape via the shared mapper — the
/// 2020 RoomDetails/Scenes shape crashes the 2018 deserializer. See
/// <see cref="Compat2018.Room2018Mapper"/>.
/// </summary>
public static object ToWireRoom(RoomEntity r) => new
{
RoomId = r.Id,
Name = r.Name,
Description = r.Description,
CreatorPlayerId = r.CreatorPlayerId,
ImageName = r.ImageName,
State = r.State,
Accessibility = r.Accessibility,
SupportsLevelVoting = r.SupportsLevelVoting,
IsAGRoom = r.IsAGRoom,
IsDormRoom = r.IsDormRoom,
CloningAllowed = r.CloningAllowed,
SupportsVRLow = r.SupportsVRLow,
SupportsMobile = r.SupportsMobile,
SupportsScreens = r.SupportsScreens,
SupportsWalkVR = r.SupportsWalkVR,
SupportsTeleportVR = r.SupportsTeleportVR,
AllowsJuniors = r.AllowsJuniors,
RoomWarningMask = r.RoomWarningMask,
CustomRoomWarning = r.CustomRoomWarning,
DisableMicAutoMute = r.DisableMicAutoMute,
};
public static object ToWireRoom(RoomEntity r) => Compat2018.Room2018Mapper.From(r);
/// <summary>
/// Idempotent admin overrides applied AFTER SeedAsync. Keeps the seed