diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-01-30 23:32:36 -0800 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-01-30 23:33:25 -0800 |
commit | fe747d3f16ebd3485c9419f36ce940aa1df5037d (patch) | |
tree | 91eed9916ce09a178e61d62a4fe5ea5cfbe11fc4 | |
parent | 452af2227f45069cb25dc86071162da0a49b9ad4 (diff) | |
download | patchfoo-fe747d3f16ebd3485c9419f36ce940aa1df5037d.tar.gz patchfoo-fe747d3f16ebd3485c9419f36ce940aa1df5037d.zip |
Catch missing ssb-fulltext
-rw-r--r-- | lib/app.js | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -3,6 +3,7 @@ var memo = require('asyncmemo') var lru = require('lrucache') var pkg = require('../package') var u = require('./util') +var pull = require('pull-stream') var Serve = require('./serve') var Render = require('./render') @@ -74,7 +75,9 @@ App.prototype.unboxMsg = function (msg, cb) { } App.prototype.search = function (opts) { - return this.sbot.fulltext.search(opts) + var search = this.sbot.fulltext && this.sbot.fulltext.search + if (!search) return pull.error(new Error('Missing fulltext search plugin')) + return search(opts) } App.prototype.getMsgDecrypted = function (key, cb) { |