summaryrefslogtreecommitdiffstats
path: root/store
diff options
context:
space:
mode:
authorKhoa, Le Ngoc <khoaln6@gmail.com>2016-02-03 16:53:03 +0700
committerKhoa, Le Ngoc <khoaln6@gmail.com>2016-02-03 16:53:03 +0700
commit36228f5f8a392a7d070b6ea3a14c055b83138980 (patch)
tree1f8507b7a504789521861c6fd5bf612190119efb /store
parentd31ae207389b7402debbcaa40bb691e86023f1ba (diff)
downloadchat-36228f5f8a392a7d070b6ea3a14c055b83138980.tar.gz
chat-36228f5f8a392a7d070b6ea3a14c055b83138980.tar.bz2
chat-36228f5f8a392a7d070b6ea3a14c055b83138980.zip
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 aeaa5922c..2a36ae049 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
}
}