aboutsummaryrefslogtreecommitdiff
path: root/lib/serve.js
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-03-07 10:50:15 -0500
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-03-07 10:50:15 -0500
commitc3809754bf089b801ee3ffa3341beb51a8005ca6 (patch)
tree5bfce58b569f1973d19647f16c1fa743b6874a11 /lib/serve.js
parentfeaae0282a0607a4a201644b26a7b5c6e5798ebb (diff)
downloadpatchfoo-c3809754bf089b801ee3ffa3341beb51a8005ca6.tar.gz
patchfoo-c3809754bf089b801ee3ffa3341beb51a8005ca6.zip
Push attached blobs on publish
Diffstat (limited to 'lib/serve.js')
-rw-r--r--lib/serve.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/serve.js b/lib/serve.js
index 7cda95d..88fe389 100644
--- a/lib/serve.js
+++ b/lib/serve.js
@@ -946,7 +946,15 @@ Serve.prototype.composer = function (opts, cb) {
} catch(e) {
return cb(), u.renderError(e)
}
- return self.app.render.publish(content, cb)
+ var done = multicb({pluck: 1, spread: true})
+ toArray(content && content.mentions).forEach(function (mention) {
+ if (mention.link && mention.link[0] === '&' && !isNaN(mention.size))
+ self.app.pushBlob(mention.link, done())
+ })
+ done(function (err) {
+ if (err) return cb(err)
+ self.app.render.publish(content, cb)
+ })
}
}