From 84af8d8b09c0f1fe8cf07171859be411e5f56670 Mon Sep 17 00:00:00 2001 From: cel Date: Mon, 12 Jun 2017 11:34:55 -1000 Subject: Use ssb-backlinks for channels/hashtags if it is available --- lib/serve.js | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'lib/serve.js') diff --git a/lib/serve.js b/lib/serve.js index 354e75f..2d088ae 100644 --- a/lib/serve.js +++ b/lib/serve.js @@ -890,23 +890,11 @@ Serve.prototype.channel = function (path) { lt: lt, gt: gt, limit: Number(q.limit) || 12, - query: [{$filter: { - value: {content: {channel: channel}}, - timestamp: { - $gt: gt, - $lt: lt, - } - }}] + channel: channel, } - if (!this.app.sbot.query) return pull( - pull.once(u.renderError(new Error('Missing ssb-query plugin')).outerHTML), - this.wrapPage('#' + channel), - this.respondSink(400, {'Content-Type': ctype('html')}) - ) - pull( - this.app.sbot.query.read(opts), + this.app.streamChannel(opts), this.renderThreadPaginated(opts, null, q), this.wrapMessages(), this.wrapChannel(channel), -- cgit v1.2.3