fix bug on leave event

This commit is contained in:
Morgan McMillian 2017-05-25 07:01:22 -07:00
parent 0ee1ca2e9b
commit 69ff15d22f

View file

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