feat(federation): add fire-and-forget S2S typing relay
sendTypingRelay() mirrors sendCallRelay() — direct POST to peers, no outbox, no retry. Uses federatedId for cross-instance channel identification. Wired into handleDmTypingStart() for typing_start and broadcastDmMessage() for typing_stop.
This commit is contained in:
@@ -30,6 +30,7 @@ import {
|
||||
getGroupDmTargetOrigins,
|
||||
isFederationRelayEnabled,
|
||||
computeFederatedId,
|
||||
sendTypingRelay,
|
||||
} from '../utils/federationOutbox.js';
|
||||
import { getOurOrigin } from '../utils/federationAuth.js';
|
||||
import type { FederationRelayEvent } from '@backspace/shared';
|
||||
@@ -191,6 +192,9 @@ export function broadcastDmMessage(dmChannelId: string, message: DmMessageWithUs
|
||||
}
|
||||
}
|
||||
|
||||
// Relay typing stop to remote peers (fire-and-forget)
|
||||
sendTypingRelay(dmChannelId, 'dm_typing_stop', message.userId);
|
||||
|
||||
for (const member of dmMembers) {
|
||||
// If this member had closed the DM, resurface it first
|
||||
if (member.closed === 1) {
|
||||
|
||||
Reference in New Issue
Block a user