From 33d62c2c6674cf19f5261817bff81cd5209408bd Mon Sep 17 00:00:00 2001 From: "Paul \"LeoNerd\" Evans" Date: Fri, 15 Aug 2014 11:40:58 +0100 Subject: [PATCH] Remember to reflect membership LEAVE events to the leaving member so they know it happened --- synapse/api/notifier.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/synapse/api/notifier.py b/synapse/api/notifier.py index 105a11401b..65b5a4ebb3 100644 --- a/synapse/api/notifier.py +++ b/synapse/api/notifier.py @@ -56,6 +56,10 @@ class Notifier(object): if (event.type == RoomMemberEvent.TYPE and event.content["membership"] == Membership.INVITE): member_list.append(event.target_user_id) + # similarly, LEAVEs must be sent to the person leaving + if (event.type == RoomMemberEvent.TYPE and + event.content["membership"] == Membership.LEAVE): + member_list.append(event.target_user_id) for user_id in member_list: if user_id in self.stored_event_listeners: