X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Fblocklist.ts;h=a11b717b548414daa8478fcd3ed6d73b5a4b2176;hb=654d4ede7fa4d0faa71e49bcfab6b65a686397b2;hp=d6b684015cb6e3f0fcf3563ae7c28b3ffb5be408;hpb=26d6bf6533023326fa017812cf31bbe20c752d36;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/blocklist.ts b/server/lib/blocklist.ts index d6b684015..a11b717b5 100644 --- a/server/lib/blocklist.ts +++ b/server/lib/blocklist.ts @@ -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 }