inbox-delayed use actor if no signature

This commit is contained in:
tamaina 2024-03-09 19:15:40 +00:00
parent 8104963e1d
commit 154a2026ea
1 changed files with 2 additions and 2 deletions

View File

@ -56,8 +56,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
const res = [] as [string, number][];
for (const job of jobs) {
const signature = 'version' in job.data.signature ? job.data.signature.value : job.data.signature;
const host = Array.isArray(signature) ? 'TODO' : new URL(signature.keyId).host;
const signature = job.data.signature ? 'version' in job.data.signature ? job.data.signature.value : job.data.signature : null;
const host = signature ? Array.isArray(signature) ? 'TODO' : new URL(signature.keyId).host : new URL(job.data.activity.actor).host;
if (res.find(x => x[0] === host)) {
res.find(x => x[0] === host)![1]++;
} else {