From: Thibaut Girka Date: Tue, 13 Nov 2018 16:30:15 +0000 (+0100) Subject: Only stream local-only toots to logged-in users X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=a100f05687a592220a0dc705652d9e9340e093ba;p=mastodon.git Only stream local-only toots to logged-in users --- 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') {