]> cat aescling's git repositories - mastodon.git/commitdiff
Only stream local-only toots to logged-in users
authorThibaut Girka <thib@sitedethib.com>
Tue, 13 Nov 2018 16:30:15 +0000 (17:30 +0100)
committerThibG <thib@sitedethib.com>
Tue, 13 Nov 2018 17:55:57 +0000 (18:55 +0100)
streaming/index.js

index b4d09d0ad2c7d60b0a0c7b1d74a7404a133d9a12..406ee09e1d86ddc6ca62e7d3c06e4f3cf264cca7 100644 (file)
@@ -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') {
This page took 0.030421 seconds and 3 git commands to generate.