Commit bdee82e994ee3ce0e26e552ad2fba8393f32ce45
whoops, don't include private messages in public feed
Matt McKegg committed on 10/24/2017, 6:36:40 AMParent: 29ec3b383dd48c6e69c75488b52ddf72714de7ad
Files changed
sbot/roots.js | changed |
sbot/roots.js | ||
---|---|---|
@@ -98,11 +98,12 @@ | ||
98 | 98 | |
99 | 99 | // FILTER ROOTS |
100 | 100 | pull.filter(item => { |
101 | 101 | var root = item.root || item |
102 | + var isPrivate = root.value && typeof root.value.content === 'string' | |
102 | 103 | |
103 | 104 | // skip this item if it has already been included |
104 | - if (!included.has(root.key) && filter && root && root.value) { | |
105 | + if (!included.has(root.key) && filter && root && root.value && !isPrivate) { | |
105 | 106 | if (checkReplyForcesDisplay(item)) { |
106 | 107 | // include this item if it has matching tags or the author is you |
107 | 108 | included.add(root.key) |
108 | 109 | return true |
Built with git-ssb-web