Commit c9ecafd6549db6ab1422db8ca5993d178f87a44b
another context fix
mix irving committed on 10/12/2017, 4:25:31 AMParent: f6a16e3fc5c25cadd2445d141a36a91d964a1813
Files changed
app/html/context.js | changed |
app/html/context.js | ||
---|---|---|
@@ -31,10 +31,10 @@ | ||
31 | 31 | // TODO - extract as contact.obs.recentPrivate or something |
32 | 32 | |
33 | 33 | pull( |
34 | 34 | next(api.feed.pull.private, {reverse: true, limit: 100, live: false}, ['value', 'timestamp']), |
35 | + pull.filter(msg => msg.value.content.type === 'post'), // TODO is this the best way to protect against votes? | |
35 | 36 | pull.filter(msg => msg.value.content.recps), |
36 | - pull.filter(msg => msg.value.content.type === 'post'), // TODO is this the best way to protect against votes? | |
37 | 37 | pull.drain(msg => { |
38 | 38 | msg.value.content.recps |
39 | 39 | .map(recp => typeof recp === 'object' ? recp.link : recp) |
40 | 40 | .filter(recp => recp != myKey) |
@@ -89,9 +89,9 @@ | ||
89 | 89 | notifications: Math.random() > 0.7 ? Math.floor(Math.random()*9+1) : 0, // TODO |
90 | 90 | imageEl: api.about.html.image(feedId), // TODO make avatar |
91 | 91 | label: api.about.obs.name(feedId), |
92 | 92 | selected: location.feed === feedId, |
93 | - location: Object.assign(lastMsg, { feed: feedId }) // TODO make obs? | |
93 | + location: Object.assign({}, lastMsg, { feed: feedId }) // TODO make obs? | |
94 | 94 | }) |
95 | 95 | }) |
96 | 96 | ]) |
97 | 97 | } |
Built with git-ssb-web