Skip to content

Commit

Permalink
Only stream local-only toots to logged-in users
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire committed Nov 13, 2018
1 parent f84897c commit a100f05
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions streaming/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down

0 comments on commit a100f05

Please sign in to comment.