Files
DorkNet/DorkNet.Server/Data/Entities/MessageEntity.cs
T
Alexa d471b418b9 Import march-2020-03-10 from private repo (scrubbed 2026-05-27)
Targets Rec Room 2020.03.10 client (also serves 2020.03.06).

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 dorknet-clientpatch-{key}.zip
  for v1-march-* Release uploads.
- .github/workflows/release.yml — on tag push publishes both
  dorknet-server-march_2020_03_10-win-x64.zip and
  dorknet-clientpatch-march_2020_03_10.zip as Release assets.

Same scrub rules as december; tools/build-patcher-zip.ps1 added to
the maintainer-side allow-list so it survives.
2026-05-27 01:06:12 +03:00

43 lines
1.6 KiB
C#

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; }
}