From c302a5c2d7696bc9dddeabe914b92ad2fdc0b0ba Mon Sep 17 00:00:00 2001 From: Hazelnoot Date: Mon, 5 May 2025 17:44:00 -0400 Subject: reorder relay activities to avoid delivery race condition --- packages/backend/src/core/AccountMoveService.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'packages/backend/src/core/AccountMoveService.ts') diff --git a/packages/backend/src/core/AccountMoveService.ts b/packages/backend/src/core/AccountMoveService.ts index 7bf33e13c5..738026f753 100644 --- a/packages/backend/src/core/AccountMoveService.ts +++ b/packages/backend/src/core/AccountMoveService.ts @@ -95,11 +95,12 @@ export class AccountMoveService { const srcPerson = await this.apRendererService.renderPerson(src); const updateAct = this.apRendererService.addContext(this.apRendererService.renderUpdate(srcPerson, src)); await this.apDeliverManagerService.deliverToFollowers(src, updateAct); - this.relayService.deliverToRelays(src, updateAct); + await this.relayService.deliverToRelays(src, updateAct); // Deliver Move activity to the followers of the old account const moveAct = this.apRendererService.addContext(this.apRendererService.renderMove(src, dst)); await this.apDeliverManagerService.deliverToFollowers(src, moveAct); + await this.relayService.deliverToRelays(src, moveAct); // Publish meUpdated event const iObj = await this.userEntityService.pack(src.id, src, { schema: 'MeDetailed', includeSecrets: true }); -- cgit v1.2.3-freya