aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2018-12-12 16:31:38 -1000
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2018-12-12 16:31:38 -1000
commita40521c160b4cb9b3e36e8668612dd3321ff2a96 (patch)
tree02d582fe81a3d7164bb12c72d8e576be0a23be6e /lib
parenta28f9dbb28295200e56066ac3ae75bc97b74669b (diff)
downloadpatchfoo-a40521c160b4cb9b3e36e8668612dd3321ff2a96.tar.gz
patchfoo-a40521c160b4cb9b3e36e8668612dd3321ff2a96.zip
Support new way of skipping ssb-ooo
Diffstat (limited to 'lib')
-rw-r--r--lib/app.js16
1 files changed, 6 insertions, 10 deletions
diff --git a/lib/app.js b/lib/app.js
index 901dc17..bf77e2a 100644
--- a/lib/app.js
+++ b/lib/app.js
@@ -405,16 +405,12 @@ App.prototype.getNameSync = function (name) {
}
function sbotGet(sbot, id, cb) {
- // try sbot.get via ssb-ooo a50da3928500f3ac0fbead0a1b335a3dd5bbc096 first
- try {
- sbot.get({id: id, raw: true}, function (err, value) {
- if (err && /^Param 0/.test(err.message)) {
- return sbot.get(id, cb)
- }
- cb(err, value)
- })
- } catch(e) {
- cb(e)
+ // ssb-ooo@1.0.1 (a50da3928500f3ac0fbead0a1b335a3dd5bbc096): raw=true
+ // ssb-ooo@1.1.0 (f7302d12e56d566b84205bbc0c8b882ae6fd9b12): ooo=false
+ if (sbot.ooo) {
+ sbot.get({id: id, raw: true, ooo: false}, cb)
+ } else {
+ sbot.get(id, cb)
}
}