diff options
author | Thibaut Girka <thib@sitedethib.com> | 2018-11-13 17:30:15 +0100 |
---|---|---|
committer | ThibG <thib@sitedethib.com> | 2018-11-13 18:55:57 +0100 |
commit | a100f05687a592220a0dc705652d9e9340e093ba (patch) | |
tree | 9f0b8a27b9bf563ac59381ceb7c9e286054b3050 /streaming | |
parent | f84897c7d7499dfa244ea254a3731d662b770748 (diff) |
Only stream local-only toots to logged-in users
Diffstat (limited to 'streaming')
-rw-r--r-- | streaming/index.js | 6 |
1 files changed, 6 insertions, 0 deletions
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') { |