diff --git a/packages/backend/src/core/QueueService.ts b/packages/backend/src/core/QueueService.ts index 0a4c2d2d5e..466cd94f16 100644 --- a/packages/backend/src/core/QueueService.ts +++ b/packages/backend/src/core/QueueService.ts @@ -121,7 +121,7 @@ export class QueueService { content, to: d[0], isSharedInbox: d[1], - } as DeliverJobData, + }, opts, }))); diff --git a/packages/backend/src/server/ActivityPubServerService.ts b/packages/backend/src/server/ActivityPubServerService.ts index 1a908156d1..e3db75d42e 100644 --- a/packages/backend/src/server/ActivityPubServerService.ts +++ b/packages/backend/src/server/ActivityPubServerService.ts @@ -162,7 +162,13 @@ export class ActivityPubServerService { } } - this.queueService.inbox(request.body as IActivity, signature); + const activity = request.body as IActivity; + if (!activity.type || !signature.keyId) { + reply.code(400); + return; + } + + this.queueService.inbox(activity, signature); reply.code(202); }