This commit is contained in:
syuilo 2018-04-06 22:40:06 +09:00
parent 2b02655a3f
commit 3cf6eab119

View file

@ -1,4 +1,5 @@
import * as kue from 'kue';
import * as debug from 'debug';
import { verifySignature } from 'http-signature';
import parseAcct from '../../../acct/parse';
@ -6,11 +7,20 @@ import User, { IRemoteUser } from '../../../models/user';
import act from '../../../remote/activitypub/act';
import resolvePerson from '../../../remote/activitypub/resolve-person';
const log = debug('misskey:queue:inbox');
// ユーザーのinboxにアクティビティが届いた時の処理
export default async (job: kue.Job, done): Promise<void> => {
const signature = job.data.signature;
const activity = job.data.activity;
//#region Log
const info = Object.assign({}, activity);
delete info['@context'];
delete info['signature'];
log(info);
//#endregion
const keyIdLower = signature.keyId.toLowerCase();
let user;