summaryrefslogtreecommitdiff
path: root/packages/backend/src/queue/processors/InboxProcessorService.ts
diff options
context:
space:
mode:
authortamaina <tamaina@hotmail.co.jp>2024-05-28 14:36:06 +0900
committerGitHub <noreply@github.com>2024-05-28 14:36:06 +0900
commit89b27d8587221a321b6ff9cdae4b714bbedd151a (patch)
tree14adf6a03ca046e70c242321a20f1b4800a35e09 /packages/backend/src/queue/processors/InboxProcessorService.ts
parent[skip ci] update release manager actions (diff)
downloadsharkey-89b27d8587221a321b6ff9cdae4b714bbedd151a.tar.gz
sharkey-89b27d8587221a321b6ff9cdae4b714bbedd151a.tar.bz2
sharkey-89b27d8587221a321b6ff9cdae4b714bbedd151a.zip
fix(federation): InboxにきたCreate, AnnounceのobjectがBearcaps urlだった際はスキップするように (#13610)
* fix(federation): AnnounceのobjectがLike出なかったらキューにためない Fix https://github.com/misskey-dev/misskey/issues/13552 * revert * better reason handlings * result * improve announce handling * skip bearcaps * also announce
Diffstat (limited to 'packages/backend/src/queue/processors/InboxProcessorService.ts')
-rw-r--r--packages/backend/src/queue/processors/InboxProcessorService.ts13
1 files changed, 11 insertions, 2 deletions
diff --git a/packages/backend/src/queue/processors/InboxProcessorService.ts b/packages/backend/src/queue/processors/InboxProcessorService.ts
index f465339075..fa7009f8f5 100644
--- a/packages/backend/src/queue/processors/InboxProcessorService.ts
+++ b/packages/backend/src/queue/processors/InboxProcessorService.ts
@@ -204,13 +204,22 @@ export class InboxProcessorService {
// アクティビティを処理
try {
- await this.apInboxService.performActivity(authUser.user, activity);
+ const result = await this.apInboxService.performActivity(authUser.user, activity);
+ if (result && !result.startsWith('ok')) {
+ this.logger.warn(`inbox activity ignored (maybe): id=${activity.id} reason=${result}`);
+ return result;
+ }
} 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';
+ if (e.id === '85ab9bd7-3a41-4530-959d-f07073900109') {
+ return 'actor has been suspended';
+ }
+ if (e.id === 'd450b8a9-48e4-4dab-ae36-f4db763fda7c') { // invalid Note
+ return e.message;
+ }
}
throw e;
}