diff options
author | Erik Johnston <erik@matrix.org> | 2014-08-18 10:59:57 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-08-18 10:59:57 +0100 |
commit | 1a1e0384efb213acd74aeb8d669b1d43f18de667 (patch) | |
tree | 64a490f5f5b79aa69b47f986da280d25a4cbec80 | |
parent | Don't bother generating png's (diff) | |
download | synapse-1a1e0384efb213acd74aeb8d669b1d43f18de667.tar.xz |
Ensure we have a 'membership' key in RoomMemberEvents
Diffstat (limited to '')
-rw-r--r-- | synapse/api/events/room.py | 2 |
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): |