mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-25 23:18:44 -07:00
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:
@@ -0,0 +1,42 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace DorkNet.Server.Data.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// Direct message between two players. Backs the watch's
|
||||
/// <c>api/messages/v2</c> endpoints (inbox + send + mark-read).
|
||||
///
|
||||
/// One row per message. Threading happens at read time — the inbox
|
||||
/// query groups by (Sender, Recipient) pair to surface the most
|
||||
/// recent message per conversation.
|
||||
/// </summary>
|
||||
public class MessageEntity
|
||||
{
|
||||
public long Id { get; set; }
|
||||
|
||||
public long SenderPlayerId { get; set; }
|
||||
public long RecipientPlayerId { get; set; }
|
||||
|
||||
[MaxLength(2000)]
|
||||
public string Body { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>RecNet <c>Message.MessageType</c> wire value (see
|
||||
/// <c>Cpp2IL_CS/.../RecNet/Message.cs</c>). Default 30 =
|
||||
/// TextMessage. Other values used by the 2020 client: 0/6 =
|
||||
/// GameInvite[V2], 3/7 = PartyActivitySwitch[V2], 10 =
|
||||
/// RequestGameInvite (the "ask to join" flow), 1 =
|
||||
/// GameInviteDeclined, 11 = RequestGameInviteDeclined, 20 =
|
||||
/// FriendStatusOnline.</summary>
|
||||
public int Type { get; set; } = 30;
|
||||
|
||||
/// <summary>Optional RecNet room id carried by invite and party
|
||||
/// activity messages. The client uses this to render room-aware
|
||||
/// cards and passes it back when accepting V2 invites.</summary>
|
||||
public long? RoomId { get; set; }
|
||||
|
||||
public DateTime SentAt { get; set; } = DateTime.UtcNow;
|
||||
|
||||
/// <summary>Null until the recipient hits the message in the
|
||||
/// watch UI; set to the read timestamp at that point.</summary>
|
||||
public DateTime? ReadAt { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user