Implement remote follow

This commit is contained in:
Akihiko Odaki 2018-04-01 19:43:26 +09:00
parent cba73d6bc1
commit dc529711ce
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;