reorder relay activities to avoid delivery race condition

This commit is contained in:
Hazelnoot 2025-05-05 17:44:00 -04:00
parent d39a56c1b7
commit c302a5c2d7
11 changed files with 40 additions and 44 deletions

View file

@ -247,11 +247,11 @@ export class NoteDeleteService {
@bindThis
private async deliverToConcerned(user: { id: MiLocalUser['id']; host: null; }, note: MiNote, content: any) {
this.apDeliverManagerService.deliverToFollowers(user, content);
this.relayService.deliverToRelays(user, content);
this.apDeliverManagerService.deliverToUsers(user, content, [
await this.apDeliverManagerService.deliverToFollowers(user, content);
await this.apDeliverManagerService.deliverToUsers(user, content, [
...await this.getMentionedRemoteUsers(note),
...await this.getRenotedOrRepliedRemoteUsers(note),
]);
await this.relayService.deliverToRelays(user, content);
}
}