diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-05-16 17:06:12 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-05-16 17:06:12 +0900 |
| commit | 66437f31c09f2257e6f683237b71e13d80fa4b50 (patch) | |
| tree | eb71ae9f190a30c1efcf9ba3317016646ac4c5c7 /src | |
| parent | :v: (diff) | |
| download | sharkey-66437f31c09f2257e6f683237b71e13d80fa4b50.tar.gz sharkey-66437f31c09f2257e6f683237b71e13d80fa4b50.tar.bz2 sharkey-66437f31c09f2257e6f683237b71e13d80fa4b50.zip | |
Save remote user's endpoints
Diffstat (limited to 'src')
| -rw-r--r-- | src/models/user.ts | 1 | ||||
| -rw-r--r-- | src/remote/activitypub/models/person.ts | 4 | ||||
| -rw-r--r-- | src/remote/activitypub/type.ts | 1 |
3 files changed, 5 insertions, 1 deletions
diff --git a/src/models/user.ts b/src/models/user.ts index af03faf847..108111ceca 100644 --- a/src/models/user.ts +++ b/src/models/user.ts @@ -87,6 +87,7 @@ export interface ILocalUser extends IUserBase { export interface IRemoteUser extends IUserBase { inbox: string; + endpoints: string[]; uri: string; url?: string; publicKey: { diff --git a/src/remote/activitypub/models/person.ts b/src/remote/activitypub/models/person.ts index 20e594ff1d..33280f3d89 100644 --- a/src/remote/activitypub/models/person.ts +++ b/src/remote/activitypub/models/person.ts @@ -101,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; @@ -208,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 => |