aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2020-03-05 13:04:37 -0500
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2020-03-05 13:05:01 -0500
commit563d9ddf23ead37693dd33afb4acbd234a9c7670 (patch)
tree0d6351be0def9fbfebcb897cfc021465b5668232
parent12b3e229c3fd0d4a79c5521170f6ed855f4a6a03 (diff)
downloadpatchfoo-563d9ddf23ead37693dd33afb4acbd234a9c7670.tar.gz
patchfoo-563d9ddf23ead37693dd33afb4acbd234a9c7670.zip
threads: use messagesByType
-rw-r--r--lib/serve.js5
1 files 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(),