diff options
Diffstat (limited to 'lib/app.js')
-rw-r--r-- | lib/app.js | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -486,10 +486,17 @@ function sbotGet(sbot, id, cb) { } function getMsgWithValue(sbot, id, cb) { + var self = this if (!id) return cb() + var parts = id.split('?unbox=') + id = parts[0] + var unbox = parts[1] && parts[1].replace(/ /g, '+') sbotGet(sbot, id, function (err, value) { if (err) return cb(err) - cb(null, {key: id, value: value}) + var msg = {key: id, value: value} + if (unbox && value && typeof value.content === 'string') + return self.app.unboxMsgWithKey(msg, unbox, cb) + cb(null, msg) }) } |