diff options
Diffstat (limited to 'lib/serve.js')
-rw-r--r-- | lib/serve.js | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/serve.js b/lib/serve.js index 56fddef..2bbc80d 100644 --- a/lib/serve.js +++ b/lib/serve.js @@ -351,7 +351,6 @@ Serve.prototype.public = function (ext) { this.app.createLogStream(opts), this.renderThreadPaginated(opts, null, q), this.wrapMessages(), - pull.take(Number(q.limit) || 12), this.wrapPublic(), this.wrapPage('public'), this.respondSink(200, { @@ -422,7 +421,6 @@ Serve.prototype.private = function (ext) { pull( this.app.streamPrivate(opts), - pull.take(Number(q.limit) || 12), this.renderThreadPaginated(opts, null, q), this.wrapMessages(), this.wrapPrivate(opts), @@ -449,7 +447,6 @@ Serve.prototype.mentions = function (ext) { ph('h3', 'Mentions'), pull( self.app.streamMentions(opts), - pull.take(Number(q.limit) || 12), self.app.unboxMessages(), self.renderThreadPaginated(opts, null, q), self.wrapMessages() @@ -917,7 +914,6 @@ Serve.prototype.type = function (path) { pull( this.app.sbot.messagesByType(opts), - pull.take(Number(q.limit) || 12), this.renderThreadPaginated(opts, null, q), this.wrapMessages(), this.wrapType(type), @@ -983,7 +979,6 @@ Serve.prototype.channel = function (path) { pull( this.app.streamChannel(opts), - pull.take(Number(q.limit) || 12), this.renderThreadPaginated(opts, null, q), this.wrapMessages(), this.wrapChannel(channel), @@ -1065,7 +1060,6 @@ Serve.prototype.userFeed = function (id, path) { if (err) self.app.error(err) pull( self.app.sbot.createUserStream(opts), - pull.take(Number(q.limit) || 20), self.renderThreadPaginated(opts, id, q), self.wrapMessages(), self.wrapUserFeed(isScrolled, id), @@ -1242,6 +1236,7 @@ Serve.prototype.renderThread = function (opts) { feed: opts && opts.feed, msgId: opts && opts.msgId, filter: this.query.filter, + limit: Number(this.query.limit) || 12, }), pull.map(u.toHTML) ) @@ -1285,7 +1280,14 @@ Serve.prototype.renderThreadPaginated = function (opts, feedId, q) { })) } }, - this.app.render.renderFeeds(opts), + this.app.render.renderFeeds({ + raw: false, + full: this.query.full != null, + feed: opts && opts.feed, + msgId: opts && opts.msgId, + filter: this.query.filter, + limit: Number(this.query.limit) || 12, + }), function onLast(msg, cb) { var num = feedId ? msg.value.sequence : opts.sortByTimestamp ? msg.value.timestamp : |