mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 19:44:51 -04:00
Fix bug when uploading state with empty state_key
This commit is contained in:
parent
aae8a37e63
commit
02db7eb209
6 changed files with 29 additions and 88 deletions
|
@ -147,16 +147,18 @@ class RoomStateEventRestServlet(RestServlet):
|
|||
|
||||
content = _parse_json(request)
|
||||
|
||||
event_dict = {
|
||||
"type": event_type,
|
||||
"content": content,
|
||||
"room_id": urllib.unquote(room_id),
|
||||
"sender": user.to_string(),
|
||||
}
|
||||
|
||||
if state_key is not None:
|
||||
event_dict["state_key"] = urllib.unquote(state_key)
|
||||
|
||||
msg_handler = self.handlers.message_handler
|
||||
yield msg_handler.handle_event(
|
||||
{
|
||||
"type": event_type,
|
||||
"content": content,
|
||||
"room_id": room_id,
|
||||
"sender": user.to_string(),
|
||||
"state_key": urllib.unquote(state_key),
|
||||
}
|
||||
)
|
||||
yield msg_handler.handle_event(event_dict)
|
||||
|
||||
defer.returnValue((200, {}))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue