diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-04-27 11:17:24 -1000 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-04-27 11:19:36 -1000 |
commit | 0373df4b547ca9bc2d07dab0c4d7720ee4cce69e (patch) | |
tree | f74ee60a0ae2a8eb2173777e870fd6e4ca0c84e9 /lib/serve.js | |
parent | daead5ea28a14391aeacf75e094b39e65e933df7 (diff) | |
download | patchfoo-0373df4b547ca9bc2d07dab0c4d7720ee4cce69e.tar.gz patchfoo-0373df4b547ca9bc2d07dab0c4d7720ee4cce69e.zip |
Add catchup links to messages in live view
Diffstat (limited to 'lib/serve.js')
-rw-r--r-- | lib/serve.js | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/lib/serve.js b/lib/serve.js index a377c04..9e1cbb5 100644 --- a/lib/serve.js +++ b/lib/serve.js @@ -382,11 +382,22 @@ Serve.prototype.search = function (ext) { Serve.prototype.live = function (ext) { var self = this + var q = self.query + var opts = { + live: true, + } + var gt = Number(q.gt) + if (gt) opts.gt = gt + else opts.old = false pull( - self.app.sbot.createLogStream({old: false}), - self.renderThread(), - self.wrapMessages(), + ph('table', {class: 'ssb-msgs'}, pull( + self.app.sbot.createLogStream(opts), + self.app.render.renderFeeds({ + withGt: true, + }), + pull.map(u.toHTML) + )), self.wrapPage('live'), self.respondSink(200, { 'Content-Type': ctype(ext), |