From 563d9ddf23ead37693dd33afb4acbd234a9c7670 Mon Sep 17 00:00:00 2001 From: cel Date: Thu, 5 Mar 2020 13:04:37 -0500 Subject: threads: use messagesByType --- lib/serve.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/serve.js b/lib/serve.js index a7b05aa..5b49983 100644 --- a/lib/serve.js +++ b/lib/serve.js @@ -533,6 +533,7 @@ Serve.prototype.public = function (ext) { Serve.prototype.threads = function (ext) { var q = this.query var opts = { + type: 'post', reverse: !q.forwards, sortByTimestamp: q.sort === 'claimed', lt: Number(q.lt) || Date.now(), @@ -541,9 +542,9 @@ Serve.prototype.threads = function (ext) { } pull( - this.app.createLogStream(opts), + this.app.sbotMessagesByType(opts), pull.filter(msg => { - return msg.value.content.type === 'post' && !msg.value.content.root + return !msg.value.content.root }), this.renderThreadPaginated(opts, null, q), this.wrapMessages(), -- cgit v1.2.3