feat(federation): hook outbox and mutation log into DM message and reaction handlers
Wire appendMutationLog + queueOutboxEvent + buildRelayPayload into all DM mutation paths so federation peers receive relay events: - REST: POST /api/dm/:id/messages, PATCH /api/dm/messages/:id, DELETE /api/dm/messages/:id - WebSocket: dm_message_create, dm_message_edit, dm_message_delete, reaction_add (DM path), reaction_remove (DM path) - Fix buildRelayPayload parameter types to accept optional replyToId and editedAt (matching DmMessageWithUser's optional fields)
This commit is contained in:
@@ -217,8 +217,8 @@ export function buildRelayPayload(
|
||||
message: {
|
||||
id: string;
|
||||
content: string | null;
|
||||
replyToId: string | null;
|
||||
editedAt: number | null;
|
||||
replyToId?: string | null;
|
||||
editedAt?: number | null;
|
||||
createdAt: number;
|
||||
},
|
||||
user: {
|
||||
@@ -232,8 +232,8 @@ export function buildRelayPayload(
|
||||
homeUserId: user.homeUserId || user.id,
|
||||
homeInstance: user.homeInstance || '',
|
||||
content: message.content,
|
||||
replyToId: message.replyToId,
|
||||
editedAt: message.editedAt,
|
||||
replyToId: message.replyToId ?? null,
|
||||
editedAt: message.editedAt ?? null,
|
||||
createdAt: message.createdAt,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user