Files: 9bf270081d898c0ec622f792b7f8e6e340f7a102 / message / async / publish.js
408 bytesRaw
1 | const h = require('mutant/h') |
2 | const nest = require('depnest') |
3 | |
4 | exports.needs = nest({ |
5 | 'sbot.async.publish': 'first' |
6 | }) |
7 | |
8 | exports.gives = nest('message.async.publish') |
9 | |
10 | exports.create = function (api) { |
11 | return nest('message.async.publish', (content, cb) => { |
12 | api.sbot.async.publish(content, (err, data) => { |
13 | console.log('publish:', err, data) |
14 | |
15 | cb(err, data) |
16 | }) |
17 | |
18 | return true |
19 | }) |
20 | } |
21 | |
22 |
Built with git-ssb-web