aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/app.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/app.js b/lib/app.js
index 297c170..6909846 100644
--- a/lib/app.js
+++ b/lib/app.js
@@ -343,9 +343,19 @@ App.prototype.getNameSync = function (name) {
return about && about.name
}
+function sbotGet(sbot, id, cb) {
+ // try sbot.get via ssb-ooo a50da3928500f3ac0fbead0a1b335a3dd5bbc096 first
+ sbot.get({id: id, raw: true}, function (err, value) {
+ if (err && err.message === 'Param 0 must by of type number') {
+ return sbot.get(id, cb)
+ }
+ cb(err, value)
+ })
+}
+
function getMsgWithValue(sbot, id, cb) {
if (!id) return cb()
- sbot.get(id, function (err, value) {
+ sbotGet(sbot, id, function (err, value) {
if (err) return cb(err)
cb(null, {key: id, value: value})
})