diff options
| author | MeiMei <30769358+mei23@users.noreply.github.com> | 2020-07-17 22:47:22 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-17 22:47:22 +0900 |
| commit | 0a4499fd039653dcce5a50023aff2d7b13a0a862 (patch) | |
| tree | 693940b8a3cd3d640bf1597ef746ec0c3016a2f2 /src | |
| parent | feat(client): 設定画面を整理 (diff) | |
| download | sharkey-0a4499fd039653dcce5a50023aff2d7b13a0a862.tar.gz sharkey-0a4499fd039653dcce5a50023aff2d7b13a0a862.tar.bz2 sharkey-0a4499fd039653dcce5a50023aff2d7b13a0a862.zip | |
Ignore Activities from deleted actors on both ends Fix #6553 (#6554)
Diffstat (limited to 'src')
| -rw-r--r-- | src/queue/processors/inbox.ts | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/queue/processors/inbox.ts b/src/queue/processors/inbox.ts index 8a292107ba..1d35079e9d 100644 --- a/src/queue/processors/inbox.ts +++ b/src/queue/processors/inbox.ts @@ -47,7 +47,15 @@ export default async (job: Bull.Job<InboxJobData>): Promise<string> => { // keyIdでわからなければ、activity.actorを元にDBから取得 || activity.actorを元にリモートから取得 if (authUser == null) { - authUser = await dbResolver.getAuthUserFromApId(getApId(activity.actor)); + try { + authUser = await dbResolver.getAuthUserFromApId(getApId(activity.actor)); + } catch (e) { + // 対象が4xxならスキップ + if (e.statusCode >= 400 && e.statusCode < 500) { + return `skip: Ignored deleted actors on both ends ${activity.actor} - ${e.statusCode}`; + } + throw `Error in actor ${activity.actor} - ${e.statusCode || e}`; + } } // それでもわからなければ終了 |