about summary refs log tree commit diff
path: root/streaming
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-12-11 20:04:53 -0600
committermultiple creatures <dev@multiple-creature.party>2019-12-11 20:04:53 -0600
commit9a435494c2efdd2ca8fc7f5fa3dbb81bf88633a1 (patch)
tree376b3fa1570b7d0abf85e5580cc48eecdc407129 /streaming
parent3dc62460b00acea03d6010b08677031332399d2c (diff)
move normalized text into own table
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 dd04d070a..f3d75f443 100644
--- a/streaming/index.js
+++ b/streaming/index.js
@@ -417,7 +417,7 @@ const startWorker = (workerId) => {
         }
 
         const queries = [
-          client.query(`SELECT 1 FROM blocks WHERE (account_id = $1 AND target_account_id IN (${placeholders(targetAccountIds, 3)})) OR (account_id = $2 AND target_account_id = $1) UNION SELECT 1 FROM mutes WHERE account_id = $1 AND target_account_id IN (${placeholders(targetAccountIds, 3)}) UNION SELECT 1 FROM statuses WHERE id = $3 AND normalized_text ~ ANY(ARRAY(SELECT f_normalize(phrase) FROM custom_filters WHERE account_id = $1)) UNION SELECT 1 FROM media_attachments WHERE (1 = (SELECT 1 FROM accounts WHERE id = $1 AND filter_undescribed)) AND status_id = $3 AND description IS NULL LIMIT 1`, [req.accountId, unpackedPayload.account.id, unpackedPayload.id].concat(targetAccountIds)),
+          client.query(`SELECT 1 FROM blocks WHERE (account_id = $1 AND target_account_id IN (${placeholders(targetAccountIds, 3)})) OR (account_id = $2 AND target_account_id = $1) UNION SELECT 1 FROM mutes WHERE account_id = $1 AND target_account_id IN (${placeholders(targetAccountIds, 3)}) UNION SELECT 1 FROM normalized_statuses WHERE status_id = $3 AND text ~ ANY(ARRAY(SELECT f_normalize(phrase) FROM custom_filters WHERE account_id = $1)) UNION SELECT 1 FROM media_attachments WHERE (1 = (SELECT 1 FROM accounts WHERE id = $1 AND filter_undescribed)) AND status_id = $3 AND description IS NULL LIMIT 1`, [req.accountId, unpackedPayload.account.id, unpackedPayload.id].concat(targetAccountIds)),
         ];
 
         if (accountDomain) {