Commit 6d887637d16d755298b8177960c699201a62b831
feed bump headings: fix up channel double up in tag mentions, and incorrectly including non-subscribed
fixes #714Matt McKegg committed on 2/12/2018, 1:22:26 AM
Parent: fcc4d4dd295cf9fad639e12cd83d8030f311fda9
Files changed
modules/feed/html/rollup.js | changed |
modules/feed/html/rollup.js | ||
---|---|---|
@@ -238,12 +238,12 @@ | ||
238 | 238 | |
239 | 239 | if (!renderedMessage) return h('div') |
240 | 240 | |
241 | 241 | if (rootBumpType === 'matches-channel') { |
242 | - var channels = [] | |
243 | - if (item.value.content.channel) channels.push(item.value.content.channel) | |
244 | - if (item.filterResult && Array.isArray(item.filterResult.matchingTags)) { | |
245 | - item.filterResult.matchingTags.forEach(x => channels.push(x)) | |
242 | + var channels = new Set() | |
243 | + if (item.filterResult) { | |
244 | + if (item.filterResult.matchesChannel) channels.add(item.value.content.channel) | |
245 | + if (Array.isArray(item.filterResult.matchingTags)) item.filterResult.matchingTags.forEach(x => channels.add(x)) | |
246 | 246 | } |
247 | 247 | meta = h('div.meta', [ |
248 | 248 | many(channels, api.channel.html.link, i18n), ' ', i18n('mentioned in your network') |
249 | 249 | ]) |
Built with git-ssb-web