]> cat aescling's git repositories - mastodon.git/commitdiff
Fix the condition in streaming listener (#6008)
authornullkal <nullkal@nil.nu>
Wed, 13 Dec 2017 12:42:16 +0000 (21:42 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Wed, 13 Dec 2017 12:42:16 +0000 (13:42 +0100)
streaming/index.js

index 198eac1ae4d43dcd3454eb0eca95f402270f361e..303e37ab4071b5fd42b3e4842128bfaac6cb7639 100644 (file)
@@ -346,7 +346,7 @@ const startWorker = (workerId) => {
             return;
           }
 
-          if (!req.accountId) {
+          if (req.accountId) {
             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)),
             ];