forked from mirror/misskey
Merge pull request #1530 from mei23/mei-ap3
Fix can't communicate with other Misskey
This commit is contained in:
commit
1aeeb1f073
@ -33,6 +33,11 @@ export default async (job: kue.Job, done): Promise<void> => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
user = await User.findOne({ usernameLower: username, host: host.toLowerCase() }) as IRemoteUser;
|
user = await User.findOne({ usernameLower: username, host: host.toLowerCase() }) as IRemoteUser;
|
||||||
|
|
||||||
|
// アクティビティを送信してきたユーザーがまだMisskeyサーバーに登録されていなかったら登録する
|
||||||
|
if (user === null) {
|
||||||
|
user = await resolvePerson(activity.actor);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
user = await User.findOne({
|
user = await User.findOne({
|
||||||
host: { $ne: null },
|
host: { $ne: null },
|
||||||
|
@ -40,5 +40,10 @@ export default (user: ILocalUser, url: string, object) => new Promise((resolve,
|
|||||||
keyId: `acct:${user.username}@${config.host}`
|
keyId: `acct:${user.username}@${config.host}`
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Signature: Signature ... => Signature: ...
|
||||||
|
let sig = req.getHeader('Signature').toString();
|
||||||
|
sig = sig.replace(/^Signature /, '');
|
||||||
|
req.setHeader('Signature', sig);
|
||||||
|
|
||||||
req.end(JSON.stringify(object));
|
req.end(JSON.stringify(object));
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user