Make room directory search case insensitive

This commit is contained in:
Erik Johnston 2019-10-29 10:24:02 +00:00
parent c482d45822
commit 342d871d76

View File

@ -201,13 +201,17 @@ class RoomWorkerStore(SQLBaseStore):
where_clauses.append(
"""
(
name LIKE ?
OR topic LIKE ?
OR canonical_alias LIKE ?
LOWER(name) LIKE ?
OR LOWER(topic) LIKE ?
OR LOWER(canonical_alias) LIKE ?
)
"""
)
query_args += [search_term, search_term, search_term]
query_args += [
search_term.lower(),
search_term.lower(),
search_term.lower(),
]
where_clause = ""
if where_clauses: