aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2020-03-03 14:57:20 -0500
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2020-03-19 17:43:55 -0400
commit4a53238c5a95193f26012e464e07094c32cbda99 (patch)
tree2578678ec1a35bb6914965a7af9da613106e4ab6 /lib
parent58d09aafb35dbd034b13de4f1b7299c3154bb9d7 (diff)
downloadpatchfoo-4a53238c5a95193f26012e464e07094c32cbda99.tar.gz
patchfoo-4a53238c5a95193f26012e464e07094c32cbda99.zip
Add "single" mode
Diffstat (limited to 'lib')
-rw-r--r--lib/serve.js15
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/serve.js b/lib/serve.js
index 5b49983..39c1138 100644
--- a/lib/serve.js
+++ b/lib/serve.js
@@ -1442,11 +1442,24 @@ Serve.prototype.streamThreadWithComposer = function (opts) {
}
}
+Serve.prototype.streamMsg = function (id) {
+ var self = this
+ return pull(
+ self.app.pullGetMsg(id),
+ self.renderThread({
+ msgId: id
+ }),
+ self.wrapMessages()
+ )
+}
+
Serve.prototype.id = function (id, path) {
var self = this
if (self.query.raw != null) return self.rawId(id)
pull(
- self.streamThreadWithComposer({root: id}),
+ self.query.single != null
+ ? self.streamMsg(id)
+ : self.streamThreadWithComposer({root: id}),
self.wrapPage(id),
self.respondSink(200)
)