git ssb

16+

Dominic / patchbay



Tree: 33dbf75c73b0fb716af94766e08f4dd2fd3443d5

Files: 33dbf75c73b0fb716af94766e08f4dd2fd3443d5 / modules / post.js

576 bytesRaw
1var markdown = require('ssb-markdown')
2var h = require('hyperscript')
3var u = require('../util')
4var ref = require('ssb-ref')
5
6//render a message
7
8var plugs = require('../plugs')
9var message_link = plugs.first(exports.message_link = [])
10var markdown = plugs.first(exports.markdown = [])
11
12exports.message_content = function (data) {
13 if(!data.value.content || !data.value.content.text) return
14
15 var root = data.value.content.root
16 var re = !root ? null : h('span', 're: ', message_link(root))
17
18 return h('div',
19 re,
20 markdown(data.value.content)
21 )
22
23}
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

Built with git-ssb-web