Browse Source

Only stream local-only toots to logged-in users

Thibaut Girka 3 months ago
parent
commit
a100f05687
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      streaming/index.js

+ 6
- 0
streaming/index.js View File

@@ -334,6 +334,12 @@ const startWorker = (workerId) => {
334 334
         return;
335 335
       }
336 336
 
337
+      // Only send local-only statuses to logged-in users
338
+      if (payload.local_only && !req.accountId) {
339
+        log.silly(req.requestId, `Message ${payload.id} filtered because it was local-only`);
340
+        return;
341
+      }
342
+
337 343
       // Only messages that may require filtering are statuses, since notifications
338 344
       // are already personalized and deletes do not matter
339 345
       if (!needsFiltering || event !== 'update') {

Loading…
Cancel
Save