Commit 3d32dd2cc4892720337acdff65bf871556608561
public: only notify for posts (not contacts, about etc)
Matt McKegg committed on 4/7/2017, 7:13:18 AMParent: cffa78292325759c294a642e710938fdb67ebbb4
Files changed
modules/feed/html/rollup.js | changed |
modules/feed/html/rollup.js | ||
---|---|---|
@@ -81,26 +81,28 @@ | ||
81 | 81 | if (item.value && item.value.author === api.keys.sync.id() && !updates()) { |
82 | 82 | return refresh() |
83 | 83 | } |
84 | 84 | if (filter) { |
85 | - var update = (item.value.content.type === 'post' && item.value.content.root) ? { | |
86 | - type: 'message', | |
87 | - messageId: item.value.content.root, | |
88 | - channel: item.value.content.channel | |
89 | - } : { | |
90 | - type: 'message', | |
91 | - author: item.value.author, | |
92 | - channel: item.value.content.channel, | |
93 | - messageId: item.key | |
94 | - } | |
85 | + if (item.value.content.type === 'post') { | |
86 | + var update = (item.value.content.root) ? { | |
87 | + type: 'message', | |
88 | + messageId: item.value.content.root, | |
89 | + channel: item.value.content.channel | |
90 | + } : { | |
91 | + type: 'message', | |
92 | + author: item.value.author, | |
93 | + channel: item.value.content.channel, | |
94 | + messageId: item.key | |
95 | + } | |
95 | 96 | |
96 | - ensureMessageAndAuthor(update, (err, update) => { | |
97 | - if (!err) { | |
98 | - if (filter(update)) { | |
99 | - updates.set(updates() + 1) | |
97 | + ensureMessageAndAuthor(update, (err, update) => { | |
98 | + if (!err) { | |
99 | + if (filter(update)) { | |
100 | + updates.set(updates() + 1) | |
101 | + } | |
100 | 102 | } |
101 | - } | |
102 | - }) | |
103 | + }) | |
104 | + } | |
103 | 105 | } else { |
104 | 106 | updates.set(updates() + 1) |
105 | 107 | } |
106 | 108 | } |
Built with git-ssb-web