summaryrefslogtreecommitdiffstats
path: root/store
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2016-02-03 11:10:35 -0500
committerHarrison Healey <harrisonmhealey@gmail.com>2016-02-03 11:10:35 -0500
commit6769969051fdb4677142161f61a142b3e21cfff9 (patch)
tree54180212eaf11271b19d43c578f4a60c7da4cf8e /store
parentf7fddd6cce43ec75599eb4aa463276f18eb4ca28 (diff)
parent36228f5f8a392a7d070b6ea3a14c055b83138980 (diff)
downloadchat-6769969051fdb4677142161f61a142b3e21cfff9.tar.gz
chat-6769969051fdb4677142161f61a142b3e21cfff9.tar.bz2
chat-6769969051fdb4677142161f61a142b3e21cfff9.zip
Merge pull request #2057 from khoa-le/PLT-1673
PLT-1673: Make hashtag searching independent of case
Diffstat (limited to 'store')
-rw-r--r--store/sql_post_store.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/store/sql_post_store.go b/store/sql_post_store.go
index c511dc370..dfb9563eb 100644
--- a/store/sql_post_store.go
+++ b/store/sql_post_store.go
@@ -629,7 +629,7 @@ func (s SqlPostStore) Search(teamId string, userId string, params *model.SearchP
if params.IsHashtag {
searchType = "Hashtags"
for _, term := range strings.Split(terms, " ") {
- termMap[term] = true
+ termMap[strings.ToUpper(term)] = true
}
}
@@ -748,7 +748,7 @@ func (s SqlPostStore) Search(teamId string, userId string, params *model.SearchP
if searchType == "Hashtags" {
exactMatch := false
for _, tag := range strings.Split(p.Hashtags, " ") {
- if termMap[tag] {
+ if termMap[strings.ToUpper(tag)] {
exactMatch = true
}
}