summaryrefslogtreecommitdiff
path: root/src/models
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2020-12-11 21:16:20 +0900
committerGitHub <noreply@github.com>2020-12-11 21:16:20 +0900
commit69c3c4e3dc71c722f9d85c4d2d6a112b6ce85296 (patch)
tree276f2dfa111772f8a2be5c5cabea2a4085d0c6a3 /src/models
parentMerge pull request #6960 from syuilo/dependabot/npm_and_yarn/ws-7.4.1 (diff)
downloadsharkey-69c3c4e3dc71c722f9d85c4d2d6a112b6ce85296.tar.gz
sharkey-69c3c4e3dc71c722f9d85c4d2d6a112b6ce85296.tar.bz2
sharkey-69c3c4e3dc71c722f9d85c4d2d6a112b6ce85296.zip
Resolve #6806 (#6935)
* :v: * :v: * Update privacy.vue
Diffstat (limited to 'src/models')
-rw-r--r--src/models/entities/user.ts7
-rw-r--r--src/models/repositories/user.ts1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/models/entities/user.ts b/src/models/entities/user.ts
index fee5906a3d..ba2062fdb6 100644
--- a/src/models/entities/user.ts
+++ b/src/models/entities/user.ts
@@ -157,6 +157,13 @@ export class User {
})
public isModerator: boolean;
+ @Index()
+ @Column('boolean', {
+ default: true,
+ comment: 'Whether the User is explorable.'
+ })
+ public isExplorable: boolean;
+
@Column('varchar', {
length: 128, array: true, default: '{}'
})
diff --git a/src/models/repositories/user.ts b/src/models/repositories/user.ts
index 87f50b448b..29facf5239 100644
--- a/src/models/repositories/user.ts
+++ b/src/models/repositories/user.ts
@@ -240,6 +240,7 @@ export class UserRepository extends Repository<User> {
carefulBot: profile!.carefulBot,
autoAcceptFollowed: profile!.autoAcceptFollowed,
noCrawle: profile!.noCrawle,
+ isExplorable: user.isExplorable,
hasUnreadSpecifiedNotes: NoteUnreads.count({
where: { userId: user.id, isSpecified: true },
take: 1