From 1a1e0384efb213acd74aeb8d669b1d43f18de667 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 18 Aug 2014 10:59:57 +0100 Subject: Ensure we have a 'membership' key in RoomMemberEvents --- synapse/api/events/room.py | 2 ++ 1 file changed, 2 insertions(+) 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): -- cgit 1.4.1