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')