diff --git a/packages/backend/src/core/QueueService.ts b/packages/backend/src/core/QueueService.ts index c999e73169..58c0953631 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 f87cb14dcf..a1dcc4f484 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); }