work on bot service
This commit is contained in:
parent
5ba5765435
commit
b9ad6ea08a
2 changed files with 10 additions and 0 deletions
|
@ -153,6 +153,9 @@ def on_receive_events(transaction):
|
|||
addadminrm = MatrixAdminRooms(matrix_id=event['sender'], room_id=event['room_id'])
|
||||
db.session.add(addadminrm)
|
||||
db.session.commit()
|
||||
else:
|
||||
print(r.status_code)
|
||||
print(r.text)
|
||||
|
||||
elif event['content']['membership'] == 'invite':
|
||||
logging.info('>> GOT ROOM INVITE')
|
||||
|
|
7
bot.py
7
bot.py
|
@ -31,6 +31,13 @@ class MonkeyBot:
|
|||
logging.debug(rm)
|
||||
logging.debug(len(rooms))
|
||||
|
||||
def on_invite(self, event):
|
||||
|
||||
logging.info("<__on_invite__>")
|
||||
logging.debug(event)
|
||||
|
||||
room = self.client.join_room(event['room_id'])
|
||||
|
||||
def on_message(self, event):
|
||||
|
||||
logging.info("<__on_message__>")
|
||||
|
|
Loading…
Reference in a new issue