diff options
| author | Marie <marie@kaifa.ch> | 2024-02-24 18:16:06 +0000 |
|---|---|---|
| committer | Marie <marie@kaifa.ch> | 2024-02-24 18:16:06 +0000 |
| commit | d539dec8b1171f31680b69c95be7c1ebf4b817b1 (patch) | |
| tree | aa82664d40c68f22f933fffece813173f9ab14fd /packages/backend/src/queue/processors/InboxProcessorService.ts | |
| parent | merge: Reactions not working on child notes in detailed view (!438) (diff) | |
| parent | fix: align note edit errors with note create errors (diff) | |
| download | sharkey-d539dec8b1171f31680b69c95be7c1ebf4b817b1.tar.gz sharkey-d539dec8b1171f31680b69c95be7c1ebf4b817b1.tar.bz2 sharkey-d539dec8b1171f31680b69c95be7c1ebf4b817b1.zip | |
merge: Merge upstream changes from 23rd of Feburary (!439)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/439
Closes #431
Approved-by: dakkar <dakkar@thenautilus.net>
Approved-by: Amelia Yukii <amelia.yukii@shourai.de>
Diffstat (limited to 'packages/backend/src/queue/processors/InboxProcessorService.ts')
| -rw-r--r-- | packages/backend/src/queue/processors/InboxProcessorService.ts | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/packages/backend/src/queue/processors/InboxProcessorService.ts b/packages/backend/src/queue/processors/InboxProcessorService.ts index 0a52c9da63..d5e103abe3 100644 --- a/packages/backend/src/queue/processors/InboxProcessorService.ts +++ b/packages/backend/src/queue/processors/InboxProcessorService.ts @@ -24,6 +24,7 @@ import { ApPersonService } from '@/core/activitypub/models/ApPersonService.js'; import { LdSignatureService } from '@/core/activitypub/LdSignatureService.js'; import { ApInboxService } from '@/core/activitypub/ApInboxService.js'; import { bindThis } from '@/decorators.js'; +import { IdentifiableError } from '@/misc/identifiable-error.js'; import { QueueLoggerService } from '../QueueLoggerService.js'; import type { InboxJobData } from '../types.js'; @@ -191,7 +192,14 @@ export class InboxProcessorService { }); // アクティビティを処理 - await this.apInboxService.performActivity(authUser.user, activity); + try { + await this.apInboxService.performActivity(authUser.user, activity); + } catch (e) { + if (e instanceof IdentifiableError) { + if (e.id === '689ee33f-f97c-479a-ac49-1b9f8140af99') return 'blocked notes with prohibited words'; + } + throw e; + } return 'ok'; } } |