diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-05-31 18:34:15 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-05-31 18:34:15 +0900 |
| commit | bd758a156ef81b628900930731042ee5b0ffb44f (patch) | |
| tree | bbd8e3339e266df473e3f2ef103fcc0c32a41d46 /src | |
| parent | typo (diff) | |
| download | sharkey-bd758a156ef81b628900930731042ee5b0ffb44f.tar.gz sharkey-bd758a156ef81b628900930731042ee5b0ffb44f.tar.bz2 sharkey-bd758a156ef81b628900930731042ee5b0ffb44f.zip | |
wip
Diffstat (limited to 'src')
| -rw-r--r-- | src/remote/activitypub/models/person.ts | 1 | ||||
| -rw-r--r-- | src/remote/activitypub/renderer/person.ts | 4 | ||||
| -rw-r--r-- | src/remote/activitypub/type.ts | 1 |
3 files changed, 5 insertions, 1 deletions
diff --git a/src/remote/activitypub/models/person.ts b/src/remote/activitypub/models/person.ts index 33280f3d89..b720c445c6 100644 --- a/src/remote/activitypub/models/person.ts +++ b/src/remote/activitypub/models/person.ts @@ -93,6 +93,7 @@ export async function createPerson(value: any, resolver?: Resolver): Promise<IUs notesCount, name: person.name, driveCapacity: 1024 * 1024 * 8, // 8MiB + isLocked: person.manuallyApprovesFollowers, username: person.preferredUsername, usernameLower: person.preferredUsername.toLowerCase(), host, diff --git a/src/remote/activitypub/renderer/person.ts b/src/remote/activitypub/renderer/person.ts index 424305f8d3..b2ac885f46 100644 --- a/src/remote/activitypub/renderer/person.ts +++ b/src/remote/activitypub/renderer/person.ts @@ -1,8 +1,9 @@ import renderImage from './image'; import renderKey from './key'; import config from '../../../config'; +import { ILocalUser } from '../../../models/user'; -export default user => { +export default (user: ILocalUser) => { const id = `${config.url}/users/${user._id}`; return { @@ -17,6 +18,7 @@ export default user => { summary: user.description, icon: user.avatarId && renderImage({ _id: user.avatarId }), image: user.bannerId && renderImage({ _id: user.bannerId }), + manuallyApprovesFollowers: user.isLocked, publicKey: renderKey(user) }; }; diff --git a/src/remote/activitypub/type.ts b/src/remote/activitypub/type.ts index ca38ec2227..77e6bc3045 100644 --- a/src/remote/activitypub/type.ts +++ b/src/remote/activitypub/type.ts @@ -45,6 +45,7 @@ export interface IPerson extends IObject { type: 'Person'; name: string; preferredUsername: string; + manuallyApprovesFollowers: boolean; inbox: string; publicKey: any; followers: any; |