mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-09-07 08:42:01 +00:00
Make 'keys' optional
This commit is contained in:
parent
99c7fbfef7
commit
8c9df8774e
@ -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 New Issue
Block a user