aboutsummaryrefslogtreecommitdiff
path: root/lib/serve.js
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-06-12 11:34:55 -1000
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-06-12 14:04:08 -1000
commit84af8d8b09c0f1fe8cf07171859be411e5f56670 (patch)
tree8538b9967fdc4d458075b4f0de5dc1d9959d2ea5 /lib/serve.js
parent0d1706f6788075c581198d8ef130c5035aa7eab2 (diff)
downloadpatchfoo-84af8d8b09c0f1fe8cf07171859be411e5f56670.tar.gz
patchfoo-84af8d8b09c0f1fe8cf07171859be411e5f56670.zip
Use ssb-backlinks for channels/hashtags if it is available
Diffstat (limited to 'lib/serve.js')
-rw-r--r--lib/serve.js16
1 files changed, 2 insertions, 14 deletions
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),