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