refactor(federation): update worker and janitor for generalized outbox columns

Replace dmChannelId/messageId column references with contextId/entityId/contextType in
federationWorker outbox delivery, spread all payload fields (membership, ownership, group,
friendship), add friend-context initial sync pass, and fix storageJanitor DM purge queries.
This commit is contained in:
Jannis Braun
2026-03-27 00:46:16 +01:00
parent fe3d8b06d8
commit 2a741a0dc7
2 changed files with 62 additions and 12 deletions
+2 -2
View File
@@ -515,12 +515,12 @@ export function cleanupSoftDeletedDmChannels(): number {
// Delete federation outbox entries
tx.delete(schema.federationOutbox)
.where(eq(schema.federationOutbox.dmChannelId, channel.id))
.where(eq(schema.federationOutbox.contextId, channel.id))
.run();
// Delete mutation log entries
tx.delete(schema.federationMutationLog)
.where(eq(schema.federationMutationLog.dmChannelId, channel.id))
.where(eq(schema.federationMutationLog.contextId, channel.id))
.run();
// Delete the channel itself