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:
@@ -519,13 +519,14 @@ export function queueReadStateRelay(
|
||||
messageRef = { sourceInstance: ourOrigin, sourceMessageId: messageId };
|
||||
}
|
||||
|
||||
const now = Date.now();
|
||||
const payload: FederationRelayEvent = {
|
||||
eventType: 'read_state_update',
|
||||
dmChannelId: channelId,
|
||||
messageId: `read_state:${userId}:${Date.now()}`,
|
||||
messageId: `read_state:${userId}:${now}`,
|
||||
federatedId: channel.federatedId,
|
||||
encryptionVersion: 0,
|
||||
timestamp: Date.now(),
|
||||
timestamp: now,
|
||||
readState: {
|
||||
user: { homeUserId, homeInstance },
|
||||
messageRef,
|
||||
|
||||
Reference in New Issue
Block a user