Import december-2020-12-18 from private repo (scrubbed 2026-05-27)

Targets Rec Room 2020.12.18 client.

Re-import after adding:
- DorkNet.ClientMod/dorknet-clientmod.json.template — config schema
  the launcher's manifest-driven patcher renders into UserData/.
- tools/build-patcher-zip.ps1 — produces the dorknet-clientpatch-{key}.zip
  Release asset the launcher fetches.
- .github/workflows/release.yml — auto-publishes both Release assets
  on v1-december-* tag push.

Scrubbed via maintainer-side scrub-for-public.ps1: same drop rules as
the prior import, plus build-patcher-zip.ps1 added to the tools/
allow-list so it survives the scrub.
This commit is contained in:
Alexa
2026-05-27 01:04:12 +03:00
commit 4edf25b2d5
375 changed files with 201291 additions and 0 deletions
@@ -0,0 +1,36 @@
namespace DorkNet.Server.Data.Entities;
/// <summary>
/// Per-(thread, player) row: membership, per-player snooze, and the
/// last-read message id used for unread counts and the inbox's "X
/// unread" badge. One row per active participant. A "leave" deletes
/// the row so the player no longer receives new messages on that
/// thread.
///
/// For two-person DMs without a custom name, rows are created lazily
/// on first MarkRead / Snooze / Leave — the thread itself still works
/// fine without rows (the message table is the source of truth for
/// who participated).
/// </summary>
public class ChatThreadMemberEntity
{
public long Id { get; set; }
/// <summary>The thread this membership applies to. Matches
/// <c>ChatMessageEntity.ThreadKey</c> / <c>ChatThreadEntity.ThreadKey</c>.</summary>
public string ThreadKey { get; set; } = string.Empty;
public long PlayerId { get; set; }
public DateTime JoinedAt { get; set; } = DateTime.UtcNow;
/// <summary>When set, the watch's inbox treats this thread as
/// muted until the UTC timestamp. Cleared by re-snoozing with a
/// null payload.</summary>
public DateTime? SnoozeUntil { get; set; }
/// <summary>Id of the last <c>ChatMessageEntity</c> the player
/// has acknowledged via <c>PUT thread/{id}/read</c>. Drives the
/// per-thread unread counter on the watch's inbox tab.</summary>
public long? LastReadMessageId { get; set; }
}