aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2019-11-11 11:03:30 -1000
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2019-11-11 11:03:30 -1000
commitedc930244c49857c53724b26229dfdb9c0002a5d (patch)
tree241fd2d58f30f8bc7088278fc00a2560263a4bbf
parenta989374f143a885920e640296902d5bbf4fe8086 (diff)
downloadpatchfoo-edc930244c49857c53724b26229dfdb9c0002a5d.tar.gz
patchfoo-edc930244c49857c53724b26229dfdb9c0002a5d.zip
Lowercase search query for ssb-search
-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'))
}