summaryrefslogtreecommitdiff
path: root/packages/backend/src/queue/processors/InboxProcessorService.ts
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2024-03-02 17:43:24 +0000
committerdakkar <dakkar@thenautilus.net>2024-03-02 17:43:24 +0000
commit2cad97c1ab39b5ae4ace4314cd3d90b574ea72c6 (patch)
tree4a7407d9502aba227e9da65c15f76306c6b43480 /packages/backend/src/queue/processors/InboxProcessorService.ts
parentmerge: Add missing IMPORTANT_NOTES.md from Sharkey/OldJoinSharkey (!443) (diff)
parentremove duplicate method (diff)
downloadsharkey-2cad97c1ab39b5ae4ace4314cd3d90b574ea72c6.tar.gz
sharkey-2cad97c1ab39b5ae4ace4314cd3d90b574ea72c6.tar.bz2
sharkey-2cad97c1ab39b5ae4ace4314cd3d90b574ea72c6.zip
merge: release 2024.3.1 (!449)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/449 Approved-by: Amelia Yukii <amelia.yukii@shourai.de> Approved-by: Marie <marie@kaifa.ch>
Diffstat (limited to 'packages/backend/src/queue/processors/InboxProcessorService.ts')
-rw-r--r--packages/backend/src/queue/processors/InboxProcessorService.ts17
1 files changed, 14 insertions, 3 deletions
diff --git a/packages/backend/src/queue/processors/InboxProcessorService.ts b/packages/backend/src/queue/processors/InboxProcessorService.ts
index f69634968d..ad1d9799a7 100644
--- a/packages/backend/src/queue/processors/InboxProcessorService.ts
+++ b/packages/backend/src/queue/processors/InboxProcessorService.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
@@ -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';
@@ -85,7 +86,7 @@ export class InboxProcessorService {
} catch (err) {
// 対象が4xxならスキップ
if (err instanceof StatusError) {
- if (err.isClientError) {
+ if (!err.isRetryable) {
throw new Bull.UnrecoverableError(`skip: Ignored deleted actors on both ends ${activity.actor} - ${err.statusCode}`);
}
throw new Error(`Error in actor ${activity.actor} - ${err.statusCode}`);
@@ -191,7 +192,17 @@ 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';
+ }
+ if (e.id === '85ab9bd7-3a41-4530-959d-f07073900109') return 'actor has been suspended';
+ }
+ throw e;
+ }
return 'ok';
}
}