summary refs log tree commit diff
path: root/synapse/api/events/room.py
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/api/events/room.py')
-rw-r--r--synapse/api/events/room.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/synapse/api/events/room.py b/synapse/api/events/room.py
index dbf537fb88..42459f3f21 100644
--- a/synapse/api/events/room.py
+++ b/synapse/api/events/room.py
@@ -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):