Ensure we have a 'membership' key in RoomMemberEvents
parent
bc2512fa95
commit
1a1e0384ef
|
@ -66,6 +66,8 @@ class RoomMemberEvent(SynapseEvent):
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
if "target_user_id" in kwargs:
|
if "target_user_id" in kwargs:
|
||||||
kwargs["state_key"] = kwargs["target_user_id"]
|
kwargs["state_key"] = kwargs["target_user_id"]
|
||||||
|
if "membership" not in kwargs:
|
||||||
|
kwargs["membership"] = kwargs.get("content", {}).get("membership")
|
||||||
super(RoomMemberEvent, self).__init__(**kwargs)
|
super(RoomMemberEvent, self).__init__(**kwargs)
|
||||||
|
|
||||||
def get_content_template(self):
|
def get_content_template(self):
|
||||||
|
|
Loading…
Reference in New Issue