From 69ff15d22fbeb8b280432ca56be68a946f6c568a Mon Sep 17 00:00:00 2001 From: Morgan McMillian Date: Thu, 25 May 2017 07:01:22 -0700 Subject: [PATCH] fix bug on leave event --- appservice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appservice.py b/appservice.py index 3f3f352..21463ae 100644 --- a/appservice.py +++ b/appservice.py @@ -150,7 +150,7 @@ def on_receive_events(transaction): r = requests.post(url, headers={"Content-Type": "application/json"}, data=json.dumps({})) - elif event['membership'] == 'leave': + elif event['content']['membership'] == 'leave': adminrm = MatrixAdminRooms.query.filter_by(room_id=event['room_id']).first() if adminrm: logging.info('>> GOT LEAVE')