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

Commit

Permalink
Merge branch 'release-v1.5.0' of github.com:matrix-org/synapse into d…
Browse files Browse the repository at this point in the history
…evelop
  • Loading branch information
erikjohnston committed Oct 29, 2019
2 parents 14504ad + 1652c8c commit e419c44
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions changelog.d/6286.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix bug where room directory search was case sensitive.
12 changes: 8 additions & 4 deletions synapse/storage/data_stores/main/room.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,17 @@ def get_largest_public_rooms(
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:
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ skip_install = True
basepython = python3.6
deps =
flake8
black
black==19.3b0 # We pin so that our tests don't start failing on new releases of black.
commands =
python -m black --check --diff .
/bin/sh -c "flake8 synapse tests scripts scripts-dev scripts/hash_password scripts/register_new_matrix_user scripts/synapse_port_db synctl {env:PEP8SUFFIX:}"
Expand Down

0 comments on commit e419c44

Please sign in to comment.