diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/app.js | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -123,9 +123,11 @@ App.prototype.unboxMsg = function (msg, cb) { } App.prototype.search = function (opts) { - var search = this.sbot.fulltext && this.sbot.fulltext.search - if (!search) return pull.error(new Error('Missing fulltext search plugin')) - return search(opts) + var fsearch = this.sbot.fulltext && this.sbot.fulltext.search + if (fsearch) return fsearch(opts) + var search = this.sbot.search && this.sbot.search.query + if (search) return search({query: opts}) + return pull.error(new Error('Search needs ssb-fulltext or ssb-search plugin')) } App.prototype.advancedSearch = function (opts) { |