fix return of query object

This commit is contained in:
Morgan McMillian 2017-03-04 14:42:40 -08:00
parent 9f94898102
commit f313b2159f

View file

@ -26,7 +26,7 @@ def on_receive_events(transaction):
events = request.get_json()["events"]
for event in events:
logging.debug(event)
user = MatrixUser.query.filter_by(matrix_id=event["user_id"])
user = MatrixUser.query.filter_by(matrix_id=event["user_id"]).first()
if (event['type'] == 'm.room.message'
and not app.config['MATRIX_PNUT_PREFIX'] in event["user_id"]