about summary refs log tree commit diff
path: root/streaming
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>2017-04-30 21:49:24 +0900
committerMatt Jankowski <mjankowski@thoughtbot.com>2017-04-30 08:49:24 -0400
commita6788662b09164cfbaf1cebe6c8abc5123452285 (patch)
tree695c32806c43416f16aea7dd73c507ed42799ca2 /streaming
parent4a5f73c8aef7500a0efe7d800447e288674bf54a (diff)
Revert "Use PostgreSQL inheritance for blocks and mutes (#2520)" (#2634)
This reverts commit 5135d609b774b177d3d3894b176a822d86b73d3c.
Diffstat (limited to 'streaming')
-rw-r--r--streaming/index.js2
1 files changed, 1 insertions, 1 deletions
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) {