Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Make public room search case insensitive #1127

Merged
merged 1 commit into from
Sep 17, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions synapse/handlers/room_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,12 +361,12 @@ def copy_and_replace(self, **kwds):

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
Expand Down