Commit 4958d122b2d8cafd75750d11c169966081fb5b46
don't include channel subscriptions by non-friends in public feed
#575Matt McKegg committed on 7/1/2017, 11:51:37 AM
Parent: 25cb5fbe705ef585e23e59387689122668c9c1b3
Files changed
sbot/roots.js | changed |
sbot/roots.js | |||
---|---|---|---|
@@ -193,13 +193,11 @@ | |||
193 | 193 … | if (err) return cb(err) | |
194 | 194 … | ssb.patchwork.getSubscriptions((err, subscriptions) => { | |
195 | 195 … | if (err) return cb(err) | |
196 | 196 … | cb(null, function (ids, msg) { | |
197 | - return ( | ||
198 | - ids.includes(msg.value.author) || | ||
199 | - checkChannel(subscriptions, ids, msg.value.content.channel) || | ||
200 | - checkFollowing(contacts, ids, msg.value.author) | ||
201 | - ) | ||
197 … | + var type = msg.value.content.type | ||
198 … | + var matchesChannel = (type !== 'channel' && checkChannel(subscriptions, ids, msg.value.content.channel)) | ||
199 … | + return ids.includes(msg.value.author) || matchesChannel || checkFollowing(contacts, ids, msg.value.author) | ||
202 | 200 … | }) | |
203 | 201 … | }) | |
204 | 202 … | }) | |
205 | 203 … | } |
Built with git-ssb-web