diff options
Diffstat (limited to 'lib/app.js')
-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) } } |