git ssb

16+

Dominic / patchbay



Tree: 1fd3c2d9148ba9ea22b04eabc592afe3ff16dabe

Files: 1fd3c2d9148ba9ea22b04eabc592afe3ff16dabe / modules / message-link.js

340 bytesRaw
1var h = require('hyperscript')
2
3exports.message_link = function (el, id, sbot) {
4 if(el) return el
5
6 var link = h('a', {href: '#'+id}, id.substring(0, 10)+'...')
7
8 sbot.get(id, function (err, value) {
9 if(err) return
10 if(value.content.text)
11 link.textContent = value.content.text.substring(0, 40)+'...'
12 })
13
14 return link
15}
16
17

Built with git-ssb-web