From 09f70e5f94777bbe5a18d2980ca221360642a970 Mon Sep 17 00:00:00 2001 From: cel Date: Sun, 8 Jul 2018 16:30:08 -1000 Subject: Support ssb-search --- lib/app.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/app.js b/lib/app.js index ca9b6b2..b63a13e 100644 --- a/lib/app.js +++ b/lib/app.js @@ -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) { -- cgit v1.2.3