diff options
| author | dakkar <dakkar@thenautilus.net> | 2025-03-05 14:12:51 +0000 |
|---|---|---|
| committer | dakkar <dakkar@thenautilus.net> | 2025-03-28 11:26:31 +0000 |
| commit | ece57345d7a6d66bf58536a7c7b012ddd7971b26 (patch) | |
| tree | ba42225126ae6d8c90ad9559463b38e879c8631e | |
| parent | merge: fix: bubble timeline not being selectable when logged out (!950) (diff) | |
| download | sharkey-ece57345d7a6d66bf58536a7c7b012ddd7971b26.tar.gz sharkey-ece57345d7a6d66bf58536a7c7b012ddd7971b26.tar.bz2 sharkey-ece57345d7a6d66bf58536a7c7b012ddd7971b26.zip | |
when creating a note as a side-effect, make it silent - fixes #986
| -rw-r--r-- | packages/backend/src/core/activitypub/ApInboxService.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/backend/src/core/activitypub/ApInboxService.ts b/packages/backend/src/core/activitypub/ApInboxService.ts index 402d5ab2a4..3995eeea67 100644 --- a/packages/backend/src/core/activitypub/ApInboxService.ts +++ b/packages/backend/src/core/activitypub/ApInboxService.ts @@ -470,7 +470,7 @@ export class ApInboxService { } @bindThis - private async create(actor: MiRemoteUser, activity: ICreate | IUpdate, resolver?: Resolver): Promise<string | void> { + private async create(actor: MiRemoteUser, activity: ICreate | IUpdate, resolver?: Resolver, silent = false): Promise<string | void> { const uri = getApId(activity); this.logger.info(`Create: ${uri}`); @@ -505,7 +505,7 @@ export class ApInboxService { }); if (isPost(object)) { - await this.createNote(resolver, actor, object, false); + await this.createNote(resolver, actor, object, silent); } else { return `skip: Unsupported type for Create: ${getApType(object)} ${getNullableApId(object)}`; } @@ -896,7 +896,7 @@ export class ApInboxService { } else if (getApType(object) === 'Question') { // If we get an Update(Question) for a note that doesn't exist, then create it instead if (!await this.apNoteService.hasNote(object)) { - return await this.create(actor, activity, resolver); + return await this.create(actor, activity, resolver, true); } await this.apQuestionService.updateQuestion(object, actor, resolver); @@ -904,7 +904,7 @@ export class ApInboxService { } else if (isPost(object)) { // If we get an Update(Note) for a note that doesn't exist, then create it instead if (!await this.apNoteService.hasNote(object)) { - return await this.create(actor, activity, resolver); + return await this.create(actor, activity, resolver, true); } await this.apNoteService.updateNote(object, actor, resolver); |