aboutsummaryrefslogtreecommitdiff
path: root/lib/serve.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/serve.js')
-rw-r--r--lib/serve.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/serve.js b/lib/serve.js
index f850302..9809696 100644
--- a/lib/serve.js
+++ b/lib/serve.js
@@ -145,13 +145,14 @@ Serve.prototype.public = function (ext) {
var q = this.query
var opts = {
reverse: !q.forwards,
+ sortByTimestamp: q.sort === 'claimed',
lt: Number(q.lt) || Date.now(),
gt: Number(q.gt) || -Infinity,
limit: Number(q.limit) || 12
}
pull(
- this.app.sbot.createLogStream(opts),
+ this.app.createLogStream(opts),
this.renderThreadPaginated(opts, null, q),
this.wrapMessages(),
this.wrapPublic(),
@@ -166,13 +167,14 @@ Serve.prototype.private = function (ext) {
var q = this.query
var opts = {
reverse: !q.forwards,
+ sortByTimestamp: q.sort === 'claimed',
lt: Number(q.lt) || Date.now(),
gt: Number(q.gt) || -Infinity,
}
var limit = Number(q.limit) || 12
pull(
- this.app.sbot.createLogStream(opts),
+ this.app.createLogStream(opts),
pull.filter(isMsgEncrypted),
paramap(this.app.unboxMsg, 4),
pull.filter(isMsgReadable),