diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-07-19 22:40:44 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-07-19 22:40:44 +0900 |
| commit | bfa326af2cf779ed08962a5e32df8d0d4675b282 (patch) | |
| tree | ef45130d2174dc64a3ffb95101e8cfc5a244c0c4 /src | |
| parent | chore: Update backers (diff) | |
| download | sharkey-bfa326af2cf779ed08962a5e32df8d0d4675b282.tar.gz sharkey-bfa326af2cf779ed08962a5e32df8d0d4675b282.tar.bz2 sharkey-bfa326af2cf779ed08962a5e32df8d0d4675b282.zip | |
WIP: Support sharedInbox
Diffstat (limited to 'src')
| -rw-r--r-- | src/models/user.ts | 1 | ||||
| -rw-r--r-- | src/remote/activitypub/models/person.ts | 3 | ||||
| -rw-r--r-- | src/remote/activitypub/type.ts | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/src/models/user.ts b/src/models/user.ts index ee95854b95..b4daa906ca 100644 --- a/src/models/user.ts +++ b/src/models/user.ts @@ -108,6 +108,7 @@ export interface ILocalUser extends IUserBase { export interface IRemoteUser extends IUserBase { inbox: string; + sharedInbox?: string; endpoints: string[]; uri: string; url?: string; diff --git a/src/remote/activitypub/models/person.ts b/src/remote/activitypub/models/person.ts index 83afd68268..c6f3e8911c 100644 --- a/src/remote/activitypub/models/person.ts +++ b/src/remote/activitypub/models/person.ts @@ -117,6 +117,7 @@ export async function createPerson(value: any, resolver?: Resolver): Promise<IUs publicKeyPem: person.publicKey.publicKeyPem }, inbox: person.inbox, + sharedInbox: person.sharedInbox, endpoints: person.endpoints, uri: person.id, url: person.url, @@ -239,6 +240,8 @@ export async function updatePerson(value: string | IObject, resolver?: Resolver) await User.update({ _id: exist._id }, { $set: { updatedAt: new Date(), + inbox: person.inbox, + sharedInbox: person.sharedInbox, avatarId: avatar ? avatar._id : null, bannerId: banner ? banner._id : null, avatarUrl: avatar && avatar.metadata.isMetaOnly ? avatar.metadata.url : null, diff --git a/src/remote/activitypub/type.ts b/src/remote/activitypub/type.ts index 13e1969b4e..9761b66dc3 100644 --- a/src/remote/activitypub/type.ts +++ b/src/remote/activitypub/type.ts @@ -47,6 +47,7 @@ export interface IPerson extends IObject { preferredUsername: string; manuallyApprovesFollowers: boolean; inbox: string; + sharedInbox?: string; publicKey: any; followers: any; following: any; |