diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2018-12-12 16:31:38 -1000 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2018-12-12 16:31:38 -1000 |
commit | a40521c160b4cb9b3e36e8668612dd3321ff2a96 (patch) | |
tree | 02d582fe81a3d7164bb12c72d8e576be0a23be6e /lib | |
parent | a28f9dbb28295200e56066ac3ae75bc97b74669b (diff) | |
download | patchfoo-a40521c160b4cb9b3e36e8668612dd3321ff2a96.tar.gz patchfoo-a40521c160b4cb9b3e36e8668612dd3321ff2a96.zip |
Support new way of skipping ssb-ooo
Diffstat (limited to 'lib')
-rw-r--r-- | lib/app.js | 16 |
1 files changed, 6 insertions, 10 deletions
@@ -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) } } |