From 237952c10d0989ec7510a9ec190baf87cacc40c3 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Tue, 13 Nov 2018 17:30:15 +0100 Subject: [PATCH] Only stream local-only toots to logged-in users --- streaming/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/streaming/index.js b/streaming/index.js index b4d09d0ad..406ee09e1 100644 --- a/streaming/index.js +++ b/streaming/index.js @@ -334,6 +334,12 @@ const startWorker = (workerId) => { return; } + // Only send local-only statuses to logged-in users + if (payload.local_only && !req.accountId) { + log.silly(req.requestId, `Message ${payload.id} filtered because it was local-only`); + return; + } + // Only messages that may require filtering are statuses, since notifications // are already personalized and deletes do not matter if (!needsFiltering || event !== 'update') {