git ssb

7+

dinoworm 🐛 / patchcore



Commit 7b4e3b287848a46c151924177595a3e17f95410a

ensure appKey (cap.shs) is passed to ssb-client, add async.friendsGet()

Dominic Tarr committed on 8/18/2017, 8:38:17 AM
Parent: cfa33aa58de8d7d7f6608e54b5aa5a4e7db080b9

Files changed

sbot.jschanged
sbot.jsView
@@ -23,9 +23,10 @@
2323 async: {
2424 get: true,
2525 publish: true,
2626 addBlob: true,
27- gossipConnect: true
27 + gossipConnect: true,
28 + friendsGet: true
2829 },
2930 pull: {
3031 log: true,
3132 userFeed: true,
@@ -59,9 +60,19 @@
5960 function notify (value) {
6061 isConn(value); connectionStatus.set(value)
6162 }
6263
63- createClient(keys, config, function (err, _sbot) {
64 + var opts = {
65 + path: config.path,
66 + remote: config.remote,
67 + host: config.host,
68 + port: config.port,
69 + key: config.key,
70 + appKey: config.caps.shs,
71 + timers: config.timers
72 + }
73 +
74 + createClient(keys, opts, function (err, _sbot) {
6475 if (err) {
6576 return notify(err)
6677 }
6778
@@ -178,8 +189,11 @@
178189 )
179190 }),
180191 gossipConnect: rec.async(function (opts, cb) {
181192 sbot.gossip.connect(opts, cb)
193 + }),
194 + friendsGet: rec.async(function (opts, cb) {
195 + sbot.friends.get(opts, cb)
182196 })
183197 },
184198 pull: {
185199 backlinks: rec.source(query => {

Built with git-ssb-web