git ssb

3+

ev / sdash



Commit da746f37c4647de40e6fd6a9f2ae5efdbb60ef4d

add repost

Ev Bogue committed on 9/15/2016, 9:20:04 PM
Parent: ebd41b26e5d433b1e3663e427faed20e23e6615d

Files changed

index.jschanged
index.jsView
@@ -5,8 +5,9 @@
55 var client = require('ssb-client')
66 var md = require('ssb-markdown')
77 var avatar = require('ssb-avatar')
88 var mo = require('moment')
9 +var ref = require('ssb-ref')
910
1011 var title = 'sdash'
1112 var me = '@8Qee0I/DwI5DHSCi3p5fsl6FyLGArrnDz3ox9qZr5Qc=.ed25519'
1213 var desc = 'This is <a href="https://gitmx.com/%25qrU04j9vfUJKfq1rGZrQ5ihtSfA4ilfY3wLy7xFv0xk%3D.sha256">sdash</a>, a work-in-progress personal gateway to the <a href="http://ssbc.github.io">scuttlebot</a> distributed social network'
@@ -36,9 +37,8 @@
3637 pull(
3738 sbot.query.read({query: [{$filter: { key: getpin.value.content.link}}]}),
3839 pull.drain(function (data) {
3940 pinned = data;
40- gotPost()
4141 })
4242 )
4343 })
4444 )
@@ -47,16 +47,17 @@
4747 pull.drain(function (data) {
4848 vote = data;
4949 pull(
5050 sbot.query.read({query: [{$filter: { key: data.value.content.vote.link}}]}),
51- pull.drain(function (reblog) {
52- avatar(sbot, me, reblog.value.author, function (err, avatar){
51 + pull.drain(function (data) {
52 + avatar(sbot, me, data.value.author, function (err, avatar){
5353 if (err) {
5454 throw err;
5555 }
5656 reauthor = avatar;
57 + gotPost()
5758 })
58- redo = reblog;
59 + redo = data;
5960 })
6061 )
6162 })
6263 )
@@ -105,9 +106,15 @@
105106 h('div.msg',
106107 h('p.small.ri', 'dig'),
107108 h('img.avatar', {src: bloburl + image}),
108109 h('div', vote.value.content.vote.link,
109- h('span.date', mo(vote.value.timestamp).fromNow())
110 + h('p.date', mo(vote.value.timestamp).fromNow()),
111 + h('div.msg',
112 + h('img.avatar', {src: bloburl + reauthor.image}),
113 + h('div', {innerHTML: md.block(redo.value.content.text)},
114 + h('span.date', mo(redo.value.timestamp).fromNow())
115 + )
116 + )
110117 )
111118 )
112119 )
113120 ).outerHTML)

Built with git-ssb-web