diff options
-rw-r--r-- | lib/app.js | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -198,11 +198,11 @@ App.prototype.unboxMsg = function (msg, cb) { return this.unboxMsgWithKey(msg, null, cb) } -App.prototype.search = function (opts) { +App.prototype.search = function (query) { var fsearch = this.sbot.fulltext && this.sbot.fulltext.search - if (fsearch) return fsearch(opts) + if (fsearch) return fsearch(query) var search = this.sbot.search && this.sbot.search.query - if (search) return search({query: opts}) + if (search) return search({query: String(query).toLowerCase()}) return pull.error(new Error('Search needs ssb-fulltext or ssb-search plugin')) } |