diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2019-10-27 21:53:27 -1000 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2019-11-08 14:46:09 -1000 |
commit | afc11752be26c10ad7084d2555572e08c9cd7782 (patch) | |
tree | ba792e6196c8cdf5dceb75dfd7f32af2f301dd1e /lib/app.js | |
parent | c7b1a484c3b62b17f138fe05b1c5df92ea8b0db0 (diff) | |
download | patchfoo-afc11752be26c10ad7084d2555572e08c9cd7782.tar.gz patchfoo-afc11752be26c10ad7084d2555572e08c9cd7782.zip |
Smarter rendering of link objects
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) }) } |