summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2016-09-16 19:02:42 +0100
committerDavid Baker <dave@matrix.org>2016-09-16 19:02:42 +0100
commit5336acd46fae8f16846970f2cddbeebc2a2b0e81 (patch)
treebb60cc886dc69f9dde3135877d1d75fee68b2498 /synapse
parentFix public room pagination for client_reader app (diff)
downloadsynapse-5336acd46fae8f16846970f2cddbeebc2a2b0e81.tar.xz
Make public room search case insensitive
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/room_list.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/handlers/room_list.py b/synapse/handlers/room_list.py
index f15987b265..9a6bbeb603 100644
--- a/synapse/handlers/room_list.py
+++ b/synapse/handlers/room_list.py
@@ -361,12 +361,12 @@ class RoomListNextBatch(namedtuple("RoomListNextBatch", (
 
 def _matches_room_entry(room_entry, search_filter):
     if search_filter and search_filter.get("generic_search_term", None):
-        generic_search_term = search_filter["generic_search_term"]
-        if generic_search_term in room_entry.get("name", ""):
+        generic_search_term = search_filter["generic_search_term"].upper()
+        if generic_search_term in room_entry.get("name", "").upper():
             return True
-        elif generic_search_term in room_entry.get("topic", ""):
+        elif generic_search_term in room_entry.get("topic", "").upper():
             return True
-        elif generic_search_term in room_entry.get("canonical_alias", ""):
+        elif generic_search_term in room_entry.get("canonical_alias", "").upper():
             return True
     else:
         return True