diff options
Diffstat (limited to 'src/remote')
| -rw-r--r-- | src/remote/activitypub/models/person.ts | 5 | ||||
| -rw-r--r-- | src/remote/activitypub/type.ts | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/remote/activitypub/models/person.ts b/src/remote/activitypub/models/person.ts index be035097b9..33280f3d89 100644 --- a/src/remote/activitypub/models/person.ts +++ b/src/remote/activitypub/models/person.ts @@ -49,6 +49,7 @@ export async function createPerson(value: any, resolver?: Resolver): Promise<IUs object == null || object.type !== 'Person' || typeof object.preferredUsername !== 'string' || + typeof object.inbox !== 'string' || !validateUsername(object.preferredUsername) || !isValidName(object.name == '' ? null : object.name) ) { @@ -100,6 +101,7 @@ export async function createPerson(value: any, resolver?: Resolver): Promise<IUs publicKeyPem: person.publicKey.publicKeyPem }, inbox: person.inbox, + endpoints: person.endpoints, uri: person.id, url: person.url }) as IRemoteUser; @@ -207,7 +209,8 @@ export async function updatePerson(value: string | IObject, resolver?: Resolver) followingCount, notesCount, name: person.name, - url: person.url + url: person.url, + endpoints: person.endpoints } }); } diff --git a/src/remote/activitypub/type.ts b/src/remote/activitypub/type.ts index 10b29fe607..ca38ec2227 100644 --- a/src/remote/activitypub/type.ts +++ b/src/remote/activitypub/type.ts @@ -50,6 +50,7 @@ export interface IPerson extends IObject { followers: any; following: any; outbox: any; + endpoints: string[]; } export const isCollection = (object: IObject): object is ICollection => |