diff options
Diffstat (limited to 'streaming/index.js')
-rw-r--r-- | streaming/index.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/streaming/index.js b/streaming/index.js index de2175144..03861e39a 100644 --- a/streaming/index.js +++ b/streaming/index.js @@ -6,7 +6,7 @@ const dotenv = require('dotenv'); const express = require('express'); const http = require('http'); const redis = require('redis'); -const pg = require('pg'); +const pg = require('pg').native; const log = require('npmlog'); const url = require('url'); const { WebSocketServer } = require('@clusterws/cws'); @@ -593,7 +593,7 @@ const startWorker = (workerId) => { } const queries = [ - client.query(`SELECT 1 FROM blocks WHERE (account_id = $1 AND target_account_id IN (${placeholders(targetAccountIds, 2)})) 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, 2)})`, [req.accountId, unpackedPayload.account.id].concat(targetAccountIds)), + client.query(`SELECT 1 FROM blocks WHERE (account_id = $1 AND target_account_id IN (${placeholders(targetAccountIds, 4)})) 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, 4)}) UNION SELECT 1 FROM conversation_mutes WHERE account_id = $1 AND conversation_id = $3 UNION SELECT 1 FROM status_mutes WHERE account_id = $1 AND status_id = $4`, [req.accountId, unpackedPayload.account.id, unpackedPayload.conversation_id, unpackedPayload.id].concat(targetAccountIds)), ]; if (accountDomain) { |