From 726b13b3ae2eefbe67d81a60011598c95b2296bf Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Sat, 22 Dec 2018 00:12:34 +0900 Subject: [PATCH] Fix sharedInbox location (#3711) * Fix sharedInbox location * Perform update Following * Fix comment --- src/remote/activitypub/models/person.ts | 14 ++++++++++++-- src/remote/activitypub/renderer/person.ts | 1 + src/remote/activitypub/type.ts | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/remote/activitypub/models/person.ts b/src/remote/activitypub/models/person.ts index 6f62da5ca..e1fb91fc1 100644 --- a/src/remote/activitypub/models/person.ts +++ b/src/remote/activitypub/models/person.ts @@ -18,6 +18,7 @@ import Instance from '../../../models/instance'; import getDriveFileUrl from '../../../misc/get-drive-file-url'; import { IEmoji } from '../../../models/emoji'; import { ITag } from './tag'; +import Following from '../../../models/following'; const log = debug('misskey:activitypub'); @@ -164,7 +165,7 @@ export async function createPerson(uri: string, resolver?: Resolver): Promise console.log(err)); } diff --git a/src/remote/activitypub/renderer/person.ts b/src/remote/activitypub/renderer/person.ts index d8e10708b..aaf78444d 100644 --- a/src/remote/activitypub/renderer/person.ts +++ b/src/remote/activitypub/renderer/person.ts @@ -63,6 +63,7 @@ export default async (user: ILocalUser) => { following: `${id}/following`, featured: `${id}/collections/featured`, sharedInbox: `${config.url}/inbox`, + endpoints: { sharedInbox: `${config.url}/inbox` }, url: `${config.url}/@${user.username}`, preferredUsername: user.username, name: user.name, diff --git a/src/remote/activitypub/type.ts b/src/remote/activitypub/type.ts index 530aaa13d..9ffe73a67 100644 --- a/src/remote/activitypub/type.ts +++ b/src/remote/activitypub/type.ts @@ -56,7 +56,7 @@ export interface IPerson extends IObject { following: any; featured?: any; outbox: any; - endpoints: string[]; + endpoints: any; } export const isCollection = (object: IObject): object is ICollection =>