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 07:27:31 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-04-30 00:27:31 +0200
commit5135d609b774b177d3d3894b176a822d86b73d3c (patch)
treed0c2d75383518ab63fa80df617dd62bec25bba89 /streaming
parentf48cb3eb170314cba1938522c0da44af21d47e83 (diff)
Use PostgreSQL inheritance for blocks and mutes (#2520)
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 3be844037..da8066ff3 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 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) => {
+          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) => {
             done()
 
             if (err) {