aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-03-16 18:14:59 -0400
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-03-16 18:14:59 -0400
commitdfe147a6e931b2aab13e7336ba4c03e52d502966 (patch)
tree8feb21ca12fa0b5050aeefcafb57a4bb9f03b56f
parent69d1c3c6fb9831d958dd04ef99052de75de43237 (diff)
downloadpatchfoo-dfe147a6e931b2aab13e7336ba4c03e52d502966.tar.gz
patchfoo-dfe147a6e931b2aab13e7336ba4c03e52d502966.zip
Handle missing ssb-query
-rw-r--r--lib/serve.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/serve.js b/lib/serve.js
index f5101e1..1c36c44 100644
--- a/lib/serve.js
+++ b/lib/serve.js
@@ -385,6 +385,11 @@ Serve.prototype.channel = function (channel) {
}}]
}
+ if (!this.app.sbot.query) return pull(
+ pull.once(u.renderError(new Error('Missing ssb-query plugin').outerHTML)),
+ self.respondSink(400, {'Content-Type': ctype('html')})
+ )
+
pull(
this.app.sbot.query.read(opts),
this.renderThreadPaginated(opts, null, q),