Merge pull request #1356 from akihikodaki/publickey
Implement remote follow
This commit is contained in:
commit
13c2de67a4
11 changed files with 114 additions and 32 deletions
8
src/common/remote/activitypub/renderer/follow.ts
Normal file
8
src/common/remote/activitypub/renderer/follow.ts
Normal 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
|
||||
});
|
||||
|
|
@ -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,
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
const WebFinger = require('webfinger.js');
|
||||
|
||||
const webFinger = new WebFinger({});
|
||||
const webFinger = new WebFinger({ tls_only: false });
|
||||
|
||||
type ILink = {
|
||||
href: string;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue