git ssb

16+

Dominic / patchbay



Tree: 560b4eeaebdc81616f23b3384a8c6ac9c0126e09

Files: 560b4eeaebdc81616f23b3384a8c6ac9c0126e09 / modules_basic / pub.js

530 bytesRaw
1var h = require('hyperscript')
2var plugs = require('../plugs')
3var avatar_name = plugs.first(exports.avatar_name = [])
4var avatar_link = plugs.first(exports.avatar_link = [])
5
6exports.message_content = function (msg, sbot) {
7 var c = msg.value.content
8 if (c.type === 'pub') {
9 var address = c.address || {}
10 return [
11 h('p', 'announced an address for ',
12 avatar_link(address.key, avatar_name(address.key)), ':'),
13 h('blockquote',
14 h('code', address.host + ':' + address.port)
15 )
16 ]
17 }
18}
19

Built with git-ssb-web