From a6788662b09164cfbaf1cebe6c8abc5123452285 Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Sun, 30 Apr 2017 21:49:24 +0900 Subject: Revert "Use PostgreSQL inheritance for blocks and mutes (#2520)" (#2634) This reverts commit 5135d609b774b177d3d3894b176a822d86b73d3c. --- streaming/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'streaming/index.js') diff --git a/streaming/index.js b/streaming/index.js index da8066ff3..3be844037 100644 --- a/streaming/index.js +++ b/streaming/index.js @@ -188,7 +188,7 @@ if (cluster.isMaster) { const unpackedPayload = JSON.parse(payload) const targetAccountIds = [unpackedPayload.account.id].concat(unpackedPayload.mentions.map(item => item.id)).concat(unpackedPayload.reblog ? [unpackedPayload.reblog.account.id] : []) - client.query(`SELECT target_account_id FROM block_mutes WHERE account_id = $1 AND target_account_id IN (${placeholders(targetAccountIds, 1)})`, [req.accountId].concat(targetAccountIds), (err, result) => { + client.query(`SELECT target_account_id FROM blocks WHERE account_id = $1 AND target_account_id IN (${placeholders(targetAccountIds, 1)}) UNION SELECT target_account_id FROM mutes WHERE account_id = $1 AND target_account_id IN (${placeholders(targetAccountIds, 1)})`, [req.accountId].concat(targetAccountIds), (err, result) => { done() if (err) { -- cgit