]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/blocklist.ts
Translated using Weblate (Vietnamese)
[github/Chocobozzz/PeerTube.git] / server / lib / blocklist.ts
index d6b684015cb6e3f0fcf3563ae7c28b3ffb5be408..a11b717b548414daa8478fcd3ed6d73b5a4b2176 100644 (file)
@@ -8,7 +8,7 @@ function addAccountInBlocklist (byAccountId: number, targetAccountId: number) {
   return sequelizeTypescript.transaction(async t => {
     return AccountBlocklistModel.upsert({
       accountId: byAccountId,
-      targetAccountId: targetAccountId
+      targetAccountId
     }, { transaction: t })
   })
 }
@@ -40,12 +40,12 @@ async function isBlockedByServerOrAccount (targetAccount: MAccountServer, userAc
 
   if (userAccount) sourceAccounts.push(userAccount.id)
 
-  const accountMutedHash = await AccountBlocklistModel.isAccountMutedByMulti(sourceAccounts, targetAccount.id)
+  const accountMutedHash = await AccountBlocklistModel.isAccountMutedByAccounts(sourceAccounts, targetAccount.id)
   if (accountMutedHash[serverAccountId] || (userAccount && accountMutedHash[userAccount.id])) {
     return true
   }
 
-  const instanceMutedHash = await ServerBlocklistModel.isServerMutedByMulti(sourceAccounts, targetAccount.Actor.serverId)
+  const instanceMutedHash = await ServerBlocklistModel.isServerMutedByAccounts(sourceAccounts, targetAccount.Actor.serverId)
   if (instanceMutedHash[serverAccountId] || (userAccount && instanceMutedHash[userAccount.id])) {
     return true
   }