diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2019-11-11 11:03:30 -1000 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2019-11-11 11:03:30 -1000 |
commit | edc930244c49857c53724b26229dfdb9c0002a5d (patch) | |
tree | 241fd2d58f30f8bc7088278fc00a2560263a4bbf /lib/app.js | |
parent | a989374f143a885920e640296902d5bbf4fe8086 (diff) | |
download | patchfoo-edc930244c49857c53724b26229dfdb9c0002a5d.tar.gz patchfoo-edc930244c49857c53724b26229dfdb9c0002a5d.zip |
Lowercase search query for ssb-search
Diffstat (limited to 'lib/app.js')
-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')) } |