mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-25 23:18:44 -07:00
fix: notification pushes now match what the 2023 client reads
Most pushes were still shaped for the 2020 watch, so the 2023 client parsed them as empty or dropped them without any error. - RelationshipChanged carries the relationship row, to both players, on friend request / accept / remove / add and on favorite / mute / ignore. Friend requests and accepts also land in the notifications inbox. - ModerationKick uses the client's flat moderation block, with the reason in VoteKickReason (the only field the dialog shows). - Bans, account deletion, password resets and second-session takeover are a Logout with a numeric reason instead of a kick to the dorm; the old string reason failed the client's parse. - SubscribeToPlayers is honoured: each connection joins a presence group per subscribed player, and presence (only presence) reaches subscribers as well as friends. The hub allows 180 s of client silence, since the client reconnects at most 3 times per login. - Admin broadcast sends its text as a coach message and can start the client's own maintenance countdown; ServerMaintenance only reads StartsInMinutes. - ConsumableMapping, StorefrontBalance, gift, player event, level-up, RoomUpdate, profile-image and PlayerLeftChat pushes carry the client's DTOs. "Join rejected" is the client's RequestGameInvite message. Contract in docs/recroom-2023-notifications.md; push frames are checked by NotificationContractTests through a capturing hub context.
This commit is contained in:
@@ -28,6 +28,8 @@ public sealed class SystemNotificationService(DorkNetDbContext db, NotificationS
|
||||
/// listed; add more as needed.</summary>
|
||||
public static class MessageType
|
||||
{
|
||||
public const int FriendInvite = 4;
|
||||
public const int RequestGameInvite = 10;
|
||||
public const int TextMessage = 30;
|
||||
public const int FriendRequestAccepted = 40;
|
||||
public const int FriendCodeUsed = 41;
|
||||
@@ -39,6 +41,8 @@ public sealed class SystemNotificationService(DorkNetDbContext db, NotificationS
|
||||
public const int CreatorPublishedNewRoom = 70;
|
||||
public const int PlayerAttendingEvent = 80;
|
||||
public const int PlayerEventInvitation = 81;
|
||||
public const int CoachMessage = 100;
|
||||
public const int FriendIntroduction = 130;
|
||||
}
|
||||
|
||||
/// <summary>Persist and push a system notification to
|
||||
|
||||
Reference in New Issue
Block a user