exclude incompatible monkeybot code
This commit is contained in:
parent
79bca8ba6c
commit
8f660d990f
1 changed files with 4 additions and 4 deletions
|
@ -13,7 +13,7 @@ app = Flask(__name__)
|
||||||
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
|
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
|
||||||
db.init_app(app)
|
db.init_app(app)
|
||||||
|
|
||||||
cmdbot = MonkeyBot()
|
#cmdbot = MonkeyBot()
|
||||||
|
|
||||||
txId = 0
|
txId = 0
|
||||||
|
|
||||||
|
@ -37,8 +37,8 @@ def on_receive_events(transaction):
|
||||||
chan_id = chan.pnut_chan
|
chan_id = chan.pnut_chan
|
||||||
else:
|
else:
|
||||||
adminrm = MatrixAdminRooms.query.filter_by(room_id=event['room_id']).first()
|
adminrm = MatrixAdminRooms.query.filter_by(room_id=event['room_id']).first()
|
||||||
if adminrm:
|
#if adminrm:
|
||||||
cmdbot.on_message(event)
|
# cmdbot.on_message(event)
|
||||||
return jsonify({})
|
return jsonify({})
|
||||||
|
|
||||||
if (event['content']['msgtype'] == 'm.text'
|
if (event['content']['msgtype'] == 'm.text'
|
||||||
|
@ -161,7 +161,7 @@ def on_receive_events(transaction):
|
||||||
if event['content']['membership'] == 'invite' and 'is_direct' in event['content'] and event['content']['is_direct'] == True:
|
if event['content']['membership'] == 'invite' and 'is_direct' in event['content'] and event['content']['is_direct'] == True:
|
||||||
|
|
||||||
logging.info('>> GOT PRIVATE INVITE')
|
logging.info('>> GOT PRIVATE INVITE')
|
||||||
cmdbot.on_invite(event)
|
#cmdbot.on_invite(event)
|
||||||
addadminrm = MatrixAdminRooms(matrix_id=event['sender'], room_id=event['room_id'])
|
addadminrm = MatrixAdminRooms(matrix_id=event['sender'], room_id=event['room_id'])
|
||||||
db.session.add(addadminrm)
|
db.session.add(addadminrm)
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|
Loading…
Reference in a new issue