aboutsummaryrefslogtreecommitdiff
path: root/lib/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/app.js')
-rw-r--r--lib/app.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/app.js b/lib/app.js
index 3d8d507..9cc80e4 100644
--- a/lib/app.js
+++ b/lib/app.js
@@ -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'))
}