git ssb

0+

alanz / patchwork



forked from Matt McKegg / patchwork

Commit 3d32dd2cc4892720337acdff65bf871556608561

public: only notify for posts (not contacts, about etc)

Matt McKegg committed on 4/7/2017, 7:13:18 AM
Parent: cffa78292325759c294a642e710938fdb67ebbb4

Files changed

modules/feed/html/rollup.jschanged
modules/feed/html/rollup.jsView
@@ -81,26 +81,28 @@
8181 if (item.value && item.value.author === api.keys.sync.id() && !updates()) {
8282 return refresh()
8383 }
8484 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+ }
9596
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+ }
100102 }
101- }
102- })
103+ })
104+ }
103105 } else {
104106 updates.set(updates() + 1)
105107 }
106108 }

Built with git-ssb-web