mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-15 13:33:54 +01:00
Make 'keys' optional
This commit is contained in:
parent
99c7fbfef7
commit
8c9df8774e
1 changed files with 3 additions and 1 deletions
|
@ -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")
|
||||
|
||||
|
|
Loading…
Reference in a new issue