diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-03-16 18:14:59 -0400 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-03-16 18:14:59 -0400 |
commit | dfe147a6e931b2aab13e7336ba4c03e52d502966 (patch) | |
tree | 8feb21ca12fa0b5050aeefcafb57a4bb9f03b56f /lib/serve.js | |
parent | 69d1c3c6fb9831d958dd04ef99052de75de43237 (diff) | |
download | patchfoo-dfe147a6e931b2aab13e7336ba4c03e52d502966.tar.gz patchfoo-dfe147a6e931b2aab13e7336ba4c03e52d502966.zip |
Handle missing ssb-query
Diffstat (limited to 'lib/serve.js')
-rw-r--r-- | lib/serve.js | 5 |
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), |