about summary refs log tree commit diff
path: root/streaming/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'streaming/index.js')
-rw-r--r--streaming/index.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/streaming/index.js b/streaming/index.js
index ee4100696..0cddb36b4 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');
@@ -647,7 +647,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) {