1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-05 12:25:54 +02:00

Some bug fixes

This commit is contained in:
syuilo
2018-04-08 03:58:11 +09:00
parent a1b490afa7
commit a02ee3a08b
81 changed files with 337 additions and 1318 deletions

View File

@@ -4,10 +4,11 @@ import { URL } from 'url';
import * as debug from 'debug';
import config from '../config';
import { ILocalUser } from '../models/user';
const log = debug('misskey:activitypub:deliver');
export default ({ account, username }, url, object) => new Promise((resolve, reject) => {
export default (user: ILocalUser, url, object) => new Promise((resolve, reject) => {
log(`--> ${url}`);
const { protocol, hostname, port, pathname, search } = new URL(url);
@@ -35,8 +36,8 @@ export default ({ account, username }, url, object) => new Promise((resolve, rej
sign(req, {
authorizationHeaderName: 'Signature',
key: account.keypair,
keyId: `acct:${username}@${config.host}`
key: user.keypair,
keyId: `acct:${user.username}@${config.host}`
});
req.end(JSON.stringify(object));