git ssb

3+

ev / sdash



Commit 673f1c3e0d3f41220ad06d849135a029dd6aa8cc

add latest mention

Ev Bogue committed on 9/15/2016, 10:27:15 PM
Parent: da746f37c4647de40e6fd6a9f2ae5efdbb60ef4d

Files changed

index.jschanged
index.jsView
@@ -17,11 +17,9 @@
1717 http.createServer(function (req, res){
1818 if (req.url === '/') {
1919 client(function (err, sbot) {
2020 avatar(sbot, me, me, function (err, avatar){
21- if (err) {
22- throw err;
23- }
21 + if (err) throw err
2422 name = avatar.name;
2523 image = avatar.image;
2624 })
2725 pull(
@@ -63,9 +61,13 @@
6361 )
6462 pull(
6563 sbot.query.read({query: [{$filter: { value: { content: {mentions: [{link: me}]}}}}], limit: 1, reverse: true}),
6664 pull.drain(function (data) {
67- mention = data
65 + avatar(sbot, me, data.value.author, function (err, avatar){
66 + if (err) throw err
67 + mentionauthor = avatar
68 + })
69 + mention = data
6870 })
6971 )
7072 pull(
7173 sbot.query.read({query: [{$filter: { value: { author: me, content: {type: 'git-update'}}}}], limit: 1, reverse: true}),
@@ -114,9 +116,17 @@
114116 h('span.date', mo(redo.value.timestamp).fromNow())
115117 )
116118 )
117119 )
120 + ),
121 + h('div.msg',
122 + h('p.small.ri', 'last mention'),
123 + h('img.avatar', {src: bloburl + mentionauthor.image}),
124 + h('div', {innerHTML: md.block(mention.value.content.text)},
125 + h('span.date', mo(mention.value.timestamp).fromNow())
126 + )
118127 )
128 +
119129 )
120130 ).outerHTML)
121131 }
122132 }

Built with git-ssb-web