nonworking photon stuff

This commit is contained in:
Devin Zuczek
2026-07-28 14:19:49 -04:00
parent d5e3d3946e
commit 3c18d827a8
10 changed files with 418 additions and 26 deletions
+13 -10
View File
@@ -14,21 +14,24 @@ import type { App } from '../context'
// ---- Player reporting ------------------------------------------------------
export const moderationRoutes = new Hono<App>({ strict: false })
// Whether the caller is currently blocked (banned / timed out / host-kicked). No
// ban storage yet, so this is always the "not blocked" answer. `ReportCategory` is
// -1 (no category) rather than 0, which is a real category; `Message` is null, not
// an empty string — the client distinguishes "no message" from a blank one.
.get(
// Whether the caller is currently blocked (banned / timed out / host-kicked). No ban
// storage yet, so this is always the "not blocked" answer — the reference server's
// stub `ReturnModerationBlockDetails()` verbatim. `ReportCategory` is `Unknown` (-1),
// not 0, which is a real category, and `Message` is the empty string that stub sends.
// `IsVoiceModAutoban`/`TimeoutStartedAt` are on the DTO but left unset there, so they
// go out with their C# defaults.
// POST with no body — the client's actual call, despite this being a pure read.
.post(
'/api/PlayerReporting/v1/moderationBlockDetails',
describeRoute({
tags: ['Moderation'],
summary: 'Whether the caller is blocked',
description:
'Ban / timeout / host-kick state for the caller. There is no ban storage yet, so ' +
'this is always the “not blocked” answer. Two details matter to the client: ' +
'`ReportCategory` is -1 (no category) rather than 0, which is a real category, and ' +
'`Message` is null rather than an empty string — the client distinguishes “no ' +
'message” from a blank one.',
'this is always the “not blocked” answer, matching the reference servers stub: ' +
'`ReportCategory` is `Unknown` (-1) rather than 0, which is a real category, and ' +
'`Message` is an empty string. `IsVoiceModAutoban` and `TimeoutStartedAt` are on ' +
'the DTO but unset by that stub, so they carry their defaults.',
responses: { 200: json(ModerationBlockDetails, 'Always “not blocked”') },
}),
(c) =>
@@ -39,7 +42,7 @@ export const moderationRoutes = new Hono<App>({ strict: false })
IsBan: false,
IsHostKick: false,
IsVoiceModAutoban: false,
Message: null,
Message: '',
PlayerIdReporter: null,
TimeoutStartedAt: null,
})