immanuelfodor / xmpp-muc-message-gateway

A multipurpose JSON forwarder microservice from HTTP POST to XMPP MUC room over TLSv1.2 with SliXMPP
Do What The F*ck You Want To Public License
10 stars 0 forks source link

Unexpected argument #3

Closed gjedeer closed 1 year ago

gjedeer commented 1 year ago
xmpp-msg-gw  | [2022-12-28 21:06:21 +0000] [7] [INFO] New message received
xmpp-msg-gw  | INFO:gateway:New message received
xmpp-msg-gw  | 192.168.2.3 - - [28/Dec/2022:21:06:21 +0000] "POST /post/asdasd HTTP/1.1" 400 106 "-" "curl/7.81.0"
xmpp-msg-gw  | [2022-12-28 21:06:52 +0000] [7] [INFO] New message received
xmpp-msg-gw  | INFO:gateway:New message received
xmpp-msg-gw  | INFO:slixmpp.features.feature_bind.bind:JID set to: ***
xmpp-msg-gw  | ERROR:slixmpp.basexmpp:XEP_0045.join_muc() got an unexpected keyword argument 'wait'
xmpp-msg-gw  | Traceback (most recent call last):
xmpp-msg-gw  |   File "/usr/local/lib/python3.11/site-packages/slixmpp/xmlstream/xmlstream.py", line 1118, in event
xmpp-msg-gw  |     handler_callback(data)
xmpp-msg-gw  |   File "/usr/src/app/xmpp_client.py", line 36, in start
xmpp-msg-gw  |     self.plugin['xep_0045'].join_muc(self.room, self.nick, wait=True)
xmpp-msg-gw  | TypeError: XEP_0045.join_muc() got an unexpected keyword argument 'wait'

After removing wait=True and building the container again, it works OK.

immanuelfodor commented 1 year ago

Well, it looks like the join_muc function was refactored along the years, so the wait kw argument is not present anymore, however, a new join_muc_wait function was introduced instead:

I'm happy that you could easily solve it by just removing the wait, it's a quick fix, though, we might need to look into the new function instead.

I'm no longer using XMPP, so I'll push this fix based on your report with a note to this issue.

Thank you!