diff --git a/appservice.py b/appservice.py index 96c8f00..c634f4f 100644 --- a/appservice.py +++ b/appservice.py @@ -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') diff --git a/bot.py b/bot.py index 82f2782..65c0eed 100644 --- a/bot.py +++ b/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__>")