fix: relay mark_unread to peers, fix docs and timestamp consistency
- Add queueReadStateRelay call in handleMarkUnread (skip '0' sentinel) - Fix double Date.now() in queueReadStateRelay (use single const) - Fix federation.md: read state relay uses outbox (not fire-and-forget), correct payload schema to match implementation
This commit is contained in:
@@ -1384,6 +1384,12 @@ function handleMarkUnread(event: Record<string, unknown>, userId: string, isFede
|
||||
channelId,
|
||||
messageId,
|
||||
});
|
||||
|
||||
// Relay mark-unread to federated peers for cross-instance sync
|
||||
// (skip the '0' sentinel — it deletes the read state and can't be mapped to a message)
|
||||
if (messageId !== '0') {
|
||||
queueReadStateRelay(channelId, messageId, userId);
|
||||
}
|
||||
}
|
||||
|
||||
// ─── DM Call Handlers (Unified Room API) ───────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user