git ssb

10+

Matt McKegg / patchwork



Commit 4958d122b2d8cafd75750d11c169966081fb5b46

don't include channel subscriptions by non-friends in public feed

#575
Matt McKegg committed on 7/1/2017, 11:51:37 AM
Parent: 25cb5fbe705ef585e23e59387689122668c9c1b3

Files changed

sbot/roots.jschanged
sbot/roots.jsView
@@ -193,13 +193,11 @@
193193 if (err) return cb(err)
194194 ssb.patchwork.getSubscriptions((err, subscriptions) => {
195195 if (err) return cb(err)
196196 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)
202200 })
203201 })
204202 })
205203 }

Built with git-ssb-web