From 4458a182583dd083746ec3dc9ccf10c83a90bc67 Mon Sep 17 00:00:00 2001 From: Jonny Rimkus Date: Sun, 16 Jan 2022 14:47:50 +0100 Subject: [PATCH] fix bot for latest slixmpp changes --- README.MD | 2 +- main.py | 5 ++++- requirements.txt | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.MD b/README.MD index ac08eab..8413915 100644 --- a/README.MD +++ b/README.MD @@ -42,4 +42,4 @@ Copy the systemd dummy file into systemd service folder. If it is neccecary to start the bot automatically when the system boots do `systemctl enable magicbot.service`. #### starting the bot without systemd -Got to the bots directory and run `./main.py &`. \ No newline at end of file +Go to the bots directory and run `./main.py &`. \ No newline at end of file diff --git a/main.py b/main.py index 50f9b03..7ec0116 100755 --- a/main.py +++ b/main.py @@ -55,7 +55,10 @@ class QueryBot(slixmpp.ClientXMPP): if self.room: for rooms in self.room.split(sep=","): logging.debug("joining: %s" % rooms) - self.plugin['xep_0045'].join_muc(rooms, self.nick, wait=True) + # join_muc will be deprecated in slixmpp 1.8.0 + # see https://slixmpp.readthedocs.io/en/latest/api/plugins/xep_0045.html?highlight=join_muc_wait#slixmpp.plugins.xep_0045.XEP_0045.join_muc_wait + # self.plugin['xep_0045'].join_muc_wait(rooms, self.nick, maxstanzas=0) + self.plugin['xep_0045'].join_muc(rooms, self.nick) async def message(self, msg): """ diff --git a/requirements.txt b/requirements.txt index 5cee126..a9bf263 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -slixmpp>=1.2.2 +slixmpp>=1.7.1 defusedxml>=0.5.0 requests>=2.19.1 -validators>=0.12.2 \ No newline at end of file +validators>=0.12.2