diff options
| author | dakkar <dakkar@thenautilus.net> | 2024-05-31 12:26:07 +0100 |
|---|---|---|
| committer | dakkar <dakkar@thenautilus.net> | 2024-05-31 12:26:07 +0100 |
| commit | 3372e0ffe153d996bdf04ae3d834633d0ba18fca (patch) | |
| tree | 7a46452030b2a2ca24d1ea9158fa5f0f75000245 /packages/backend/src/queue/processors/InboxProcessorService.ts | |
| parent | Merge branch 'develop' into future (diff) | |
| parent | Bump version to 2024.5.0-rc.9 (diff) | |
| download | sharkey-3372e0ffe153d996bdf04ae3d834633d0ba18fca.tar.gz sharkey-3372e0ffe153d996bdf04ae3d834633d0ba18fca.tar.bz2 sharkey-3372e0ffe153d996bdf04ae3d834633d0ba18fca.zip | |
Merge remote-tracking branch 'misskey/release/2024.5.0' into future
Diffstat (limited to 'packages/backend/src/queue/processors/InboxProcessorService.ts')
| -rw-r--r-- | packages/backend/src/queue/processors/InboxProcessorService.ts | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/packages/backend/src/queue/processors/InboxProcessorService.ts b/packages/backend/src/queue/processors/InboxProcessorService.ts index ce32a482fd..641b8b8607 100644 --- a/packages/backend/src/queue/processors/InboxProcessorService.ts +++ b/packages/backend/src/queue/processors/InboxProcessorService.ts @@ -193,6 +193,8 @@ export class InboxProcessorService { this.federatedInstanceService.update(i.id, { latestRequestReceivedAt: new Date(), isNotResponding: false, + // もしサーバーが死んでるために配信が止まっていた場合には自動的に復活させてあげる + suspensionState: i.suspensionState === 'autoSuspendedForNotResponding' ? 'none' : undefined, }); this.fetchInstanceMetadataService.fetchInstanceMetadata(i); @@ -207,13 +209,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; } |