From dfe147a6e931b2aab13e7336ba4c03e52d502966 Mon Sep 17 00:00:00 2001 From: cel Date: Thu, 16 Mar 2017 18:14:59 -0400 Subject: Handle missing ssb-query --- lib/serve.js | 5 +++++ 1 file changed, 5 insertions(+) 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), -- cgit v1.2.3