Merge pull request #1356 from akihikodaki/publickey

Implement remote follow
This commit is contained in:
syuilo 2018-04-01 23:32:46 +09:00 committed by GitHub
commit 13c2de67a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 114 additions and 32 deletions

View file

@ -0,0 +1,8 @@
import config from '../../../../conf';
import { IRemoteAccount } from '../../../../models/user';
export default ({ username }, { account }) => ({
type: 'Follow',
actor: `${config.url}/@${username}`,
object: (account as IRemoteAccount).uri
});

View file

@ -66,6 +66,7 @@ export default async (value, usernameLower, hostLower, acctLower) => {
id: object.publicKey.id,
publicKeyPem: object.publicKey.publicKeyPem
},
inbox: object.inbox,
uri: object.id,
},
});

View file

@ -1,6 +1,6 @@
const WebFinger = require('webfinger.js');
const webFinger = new WebFinger({});
const webFinger = new WebFinger({ tls_only: false });
type ILink = {
href: string;