fix(Queue): InboxやDeliverキューにdataフィールドが空のジョブが登録されないように (MisskeyIO#307)
This commit is contained in:
parent
c64be8b9f9
commit
efee8f45f9
|
@ -121,7 +121,7 @@ export class QueueService {
|
||||||
content,
|
content,
|
||||||
to: d[0],
|
to: d[0],
|
||||||
isSharedInbox: d[1],
|
isSharedInbox: d[1],
|
||||||
} as DeliverJobData,
|
},
|
||||||
opts,
|
opts,
|
||||||
})));
|
})));
|
||||||
|
|
||||||
|
|
|
@ -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);
|
reply.code(202);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue