From 80badf493afca026bc542260f353210e605a1715 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 6 Dec 2021 16:53:00 +0100 Subject: Add mute status in account and channel pages --- server/lib/blocklist.ts | 4 ++-- server/lib/notifier/shared/comment/comment-mention.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'server/lib') 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 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 } diff --git a/server/lib/notifier/shared/comment/comment-mention.ts b/server/lib/notifier/shared/comment/comment-mention.ts index 4f84d8dea..765cbaad9 100644 --- a/server/lib/notifier/shared/comment/comment-mention.ts +++ b/server/lib/notifier/shared/comment/comment-mention.ts @@ -47,8 +47,8 @@ export class CommentMention extends AbstractNotification u.Account.id).concat([ this.serverAccountId ]) - this.accountMutedHash = await AccountBlocklistModel.isAccountMutedByMulti(sourceAccounts, this.payload.accountId) - this.instanceMutedHash = await ServerBlocklistModel.isServerMutedByMulti(sourceAccounts, this.payload.Account.Actor.serverId) + this.accountMutedHash = await AccountBlocklistModel.isAccountMutedByAccounts(sourceAccounts, this.payload.accountId) + this.instanceMutedHash = await ServerBlocklistModel.isServerMutedByAccounts(sourceAccounts, this.payload.Account.Actor.serverId) } log () { -- cgit v1.2.3