about summary refs log tree commit diff
path: root/streaming
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2020-01-10 14:19:04 -0600
committermultiple creatures <dev@multiple-creature.party>2020-01-10 14:19:04 -0600
commit13b4d7953adfa8455f800a56124c7d6ecafa41ca (patch)
tree76fa5d86a2e646c09b08637625cc31aaa2f694b0 /streaming
parente13202c114eeb7584e776a073a41d9e57ae31e02 (diff)
add ability to toggle individual filters without deleting them
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 fe61c5c2e..f429bbcc1 100644
--- a/streaming/index.js
+++ b/streaming/index.js
@@ -424,7 +424,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 ${req.invertFilters ? 'AND NOT' : 'AND'} tsv @@ (SELECT tsquery_union(websearch_to_tsquery(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 statuses WHERE id = $3 ${req.invertFilters ? 'AND NOT' : 'AND'} tsv @@ (SELECT tsquery_union(websearch_to_tsquery(phrase)) FROM custom_filters WHERE account_id = $1 AND is_enabled) 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) {