git ssb

10+

Matt McKegg / patchwork



Commit 6d887637d16d755298b8177960c699201a62b831

feed bump headings: fix up channel double up in tag mentions, and incorrectly including non-subscribed

fixes #714
Matt McKegg committed on 2/12/2018, 1:22:26 AM
Parent: fcc4d4dd295cf9fad639e12cd83d8030f311fda9

Files changed

modules/feed/html/rollup.jschanged
modules/feed/html/rollup.jsView
@@ -238,12 +238,12 @@
238238
239239 if (!renderedMessage) return h('div')
240240
241241 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))
246246 }
247247 meta = h('div.meta', [
248248 many(channels, api.channel.html.link, i18n), ' ', i18n('mentioned in your network')
249249 ])

Built with git-ssb-web