From a100f05687a592220a0dc705652d9e9340e093ba 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 b4d09d0ad2..406ee09e1d 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') {