diff options
author | Chocobozzz <me@florianbigard.com> | 2021-12-06 16:53:00 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-12-07 09:46:01 +0100 |
commit | 80badf493afca026bc542260f353210e605a1715 (patch) | |
tree | fcecf7ebb3acdd4ce598dc71c3df4873d88ca244 /server/lib/blocklist.ts | |
parent | 33675a4775d1e1e9dcb58e7e53f5027b81262622 (diff) | |
download | PeerTube-80badf493afca026bc542260f353210e605a1715.tar.gz PeerTube-80badf493afca026bc542260f353210e605a1715.tar.zst PeerTube-80badf493afca026bc542260f353210e605a1715.zip |
Add mute status in account and channel pages
Diffstat (limited to 'server/lib/blocklist.ts')
-rw-r--r-- | server/lib/blocklist.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/lib/blocklist.ts b/server/lib/blocklist.ts index d6b684015..98273a6ea 100644 --- a/server/lib/blocklist.ts +++ b/server/lib/blocklist.ts | |||
@@ -40,12 +40,12 @@ async function isBlockedByServerOrAccount (targetAccount: MAccountServer, userAc | |||
40 | 40 | ||
41 | if (userAccount) sourceAccounts.push(userAccount.id) | 41 | if (userAccount) sourceAccounts.push(userAccount.id) |
42 | 42 | ||
43 | const accountMutedHash = await AccountBlocklistModel.isAccountMutedByMulti(sourceAccounts, targetAccount.id) | 43 | const accountMutedHash = await AccountBlocklistModel.isAccountMutedByAccounts(sourceAccounts, targetAccount.id) |
44 | if (accountMutedHash[serverAccountId] || (userAccount && accountMutedHash[userAccount.id])) { | 44 | if (accountMutedHash[serverAccountId] || (userAccount && accountMutedHash[userAccount.id])) { |
45 | return true | 45 | return true |
46 | } | 46 | } |
47 | 47 | ||
48 | const instanceMutedHash = await ServerBlocklistModel.isServerMutedByMulti(sourceAccounts, targetAccount.Actor.serverId) | 48 | const instanceMutedHash = await ServerBlocklistModel.isServerMutedByAccounts(sourceAccounts, targetAccount.Actor.serverId) |
49 | if (instanceMutedHash[serverAccountId] || (userAccount && instanceMutedHash[userAccount.id])) { | 49 | if (instanceMutedHash[serverAccountId] || (userAccount && instanceMutedHash[userAccount.id])) { |
50 | return true | 50 | return true |
51 | } | 51 | } |