diff options
author | Erik Johnston <erik@matrix.org> | 2015-10-14 10:35:50 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-10-14 10:35:50 +0100 |
commit | 8c9df8774e781da838efc18953785cfa1a2af0a7 (patch) | |
tree | a1ca332d15852b6a470a635922ab824ae95f55a3 /synapse/handlers/search.py | |
parent | Fix to work with SQLite (diff) | |
download | synapse-8c9df8774e781da838efc18953785cfa1a2af0a7.tar.xz |
Make 'keys' optional
Diffstat (limited to 'synapse/handlers/search.py')
-rw-r--r-- | synapse/handlers/search.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/handlers/search.py b/synapse/handlers/search.py index 8140c0b9d4..7f1efe2b46 100644 --- a/synapse/handlers/search.py +++ b/synapse/handlers/search.py @@ -84,7 +84,9 @@ class SearchHandler(BaseHandler): def search(self, user, content): try: search_term = content["search_categories"]["room_events"]["search_term"] - keys = content["search_categories"]["room_events"]["keys"] + keys = content["search_categories"]["room_events"].get("keys", [ + "content.body", "content.name", "content.topic", + ]) except KeyError: raise SynapseError(400, "Invalid search query") |