git ssb

16+

Dominic / patchbay



Tree: 8dfd53f6b3b313f0e6bf9db8230c208c1f91937c

Files: 8dfd53f6b3b313f0e6bf9db8230c208c1f91937c / modules_basic / pub.js

542 bytesRaw
1var h = require('hyperscript')
2
3exports.needs = {
4 avatar_name: 'first',
5 avatar_link: 'first'
6}
7
8exports.gives = 'message_content'
9
10exports.create = function (api) {
11
12 return function (msg, sbot) {
13 var c = msg.value.content
14 if (c.type === 'pub') {
15 var address = c.address || {}
16 return [
17 h('p', 'announced an address for ',
18 api.avatar_link(address.key, api.avatar_name(address.key)), ':'),
19 h('blockquote',
20 h('code', address.host + ':' + address.port)
21 )
22 ]
23 }
24 }
25
26}
27

Built with git-ssb-web