This commit is contained in:
syuilo
2018-04-08 05:02:50 +09:00
parent 7f448221ce
commit 5ddb047794
6 changed files with 14 additions and 32 deletions

View File

@ -1,8 +1,8 @@
import config from '../../../config';
import { IRemoteUser } from '../../../models/user';
import { IRemoteUser, ILocalUser } from '../../../models/user';
export default ({ username }, followee: IRemoteUser) => ({
export default (follower: ILocalUser, followee: IRemoteUser) => ({
type: 'Follow',
actor: `${config.url}/@${username}`,
actor: `${config.url}/@${follower.username}`,
object: followee.uri
});

View File

@ -66,14 +66,12 @@ export default async (value, verifier?: string) => {
usernameLower: object.preferredUsername.toLowerCase(),
host,
hostLower,
account: {
publicKey: {
id: object.publicKey.id,
publicKeyPem: object.publicKey.publicKeyPem
},
inbox: object.inbox,
uri: id,
publicKey: {
id: object.publicKey.id,
publicKeyPem: object.publicKey.publicKeyPem
},
inbox: object.inbox,
uri: id
});
const [avatarId, bannerId] = (await Promise.all([