mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-26 23:48:45 -07:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user