diff options
author | Chocobozzz <me@florianbigard.com> | 2019-01-02 16:37:43 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-01-09 11:15:15 +0100 |
commit | dc13348070d808d0ba3feb56a435b835c2e7e791 (patch) | |
tree | 887202a33f1aa680fd8ece6ee465381f3931c64e /server/models/account/account-blocklist.ts | |
parent | 6e7e63b83f08ba68edc2bb9f72ff03d1802e45df (diff) | |
download | PeerTube-dc13348070d808d0ba3feb56a435b835c2e7e791.tar.gz PeerTube-dc13348070d808d0ba3feb56a435b835c2e7e791.tar.zst PeerTube-dc13348070d808d0ba3feb56a435b835c2e7e791.zip |
Add import finished and video published notifs
Diffstat (limited to 'server/models/account/account-blocklist.ts')
-rw-r--r-- | server/models/account/account-blocklist.ts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/server/models/account/account-blocklist.ts b/server/models/account/account-blocklist.ts index fa2819235..54ac290c4 100644 --- a/server/models/account/account-blocklist.ts +++ b/server/models/account/account-blocklist.ts | |||
@@ -72,6 +72,21 @@ export class AccountBlocklistModel extends Model<AccountBlocklistModel> { | |||
72 | }) | 72 | }) |
73 | BlockedAccount: AccountModel | 73 | BlockedAccount: AccountModel |
74 | 74 | ||
75 | static isAccountMutedBy (accountId: number, targetAccountId: number) { | ||
76 | const query = { | ||
77 | attributes: [ 'id' ], | ||
78 | where: { | ||
79 | accountId, | ||
80 | targetAccountId | ||
81 | }, | ||
82 | raw: true | ||
83 | } | ||
84 | |||
85 | return AccountBlocklistModel.unscoped() | ||
86 | .findOne(query) | ||
87 | .then(a => !!a) | ||
88 | } | ||
89 | |||
75 | static loadByAccountAndTarget (accountId: number, targetAccountId: number) { | 90 | static loadByAccountAndTarget (accountId: number, targetAccountId: number) { |
76 | const query = { | 91 | const query = { |
77 | where: { | 92 | where: { |