From: Thibaut Girka Date: Fri, 24 May 2019 13:23:52 +0000 (+0200) Subject: Merge branch 'master' into glitch-soc/merge-upstream X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=652147a3f41e4f2031d4a26a8378265aaa6e76b8;p=mastodon.git Merge branch 'master' into glitch-soc/merge-upstream Conflicts: - streaming/index.js --- 652147a3f41e4f2031d4a26a8378265aaa6e76b8 diff --cc streaming/index.js index 55ecc3ba3,639867b28..10df210a3 --- a/streaming/index.js +++ b/streaming/index.js @@@ -339,12 -371,10 +371,16 @@@ const startWorker = (workerId) => return; } + if (event === 'notification' && !req.allowNotifications) { + 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') {