mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-21 17:15:38 +03:00
Ensure we have a 'membership' key in RoomMemberEvents
This commit is contained in:
parent
bc2512fa95
commit
1a1e0384ef
1 changed files with 2 additions and 0 deletions
|
@ -66,6 +66,8 @@ class RoomMemberEvent(SynapseEvent):
|
|||
def __init__(self, **kwargs):
|
||||
if "target_user_id" in kwargs:
|
||||
kwargs["state_key"] = kwargs["target_user_id"]
|
||||
if "membership" not in kwargs:
|
||||
kwargs["membership"] = kwargs.get("content", {}).get("membership")
|
||||
super(RoomMemberEvent, self).__init__(**kwargs)
|
||||
|
||||
def get_content_template(self):
|
||||
|
|
Loading…
Reference in a new issue