Open nessuscity opened 1 year ago
Setting BOT_ASYNC=False
seems to fix the issue. I don't know enough about asyncio or threading to know if it's a bug that you can't use BOT_ASYNC=True
with the slixmpp backend
BOT_ASYNC=False
doesn't fix messages to MUCs :(
Describe the bug When plugins reply to a message, the message is sent to the backend immediately. Other backends seem to process the messages correctly and the response is received quickly by the user. With the XMPP backend, messages are sent to the backend from plugins immediately, but the backend holds off transmitting the replies until it receives some other interaction, which can be any XMPP stanza.
To Reproduce
!echo hello
to the bot from an XMPP client that is configured NOT to send read state, chat markers, or anything else. The bot should not be receiving any stanzas except messages.!echo world
The buffered reply is also sent automatically if the bot receives any message or other stanza from another user or the server. In the absence of any such stanzas, the bot will hold onto the reply indefinitely.
Expected behavior The bot replies immediately with "hello"
Screenshots Attempts from main JID to use !echo command:![image](https://user-images.githubusercontent.com/104790972/189163958-b21ac8d6-7445-4e61-a462-01a93b58a9c9.png)
Notice that when I sent a message from a separate JID to the bot, it replied on my main JID. The second time it responded on its own was due to the XMPP keepalive triggering.![image](https://user-images.githubusercontent.com/104790972/189164021-eb381151-733a-4487-8ca4-855474b893b1.png)
Environment (please complete the following information):
Additional context I've tested this on multiple machines with errbot from pip and from github. I believe the fact that any stanza received hides the bug is what allowed it to get thru testing. I have witnessed this behavior on another known XMPP errbot in the wild.
Logs also show that the XMPP backend's
send_message
method is being called at the correct time, but the actual response stanza is not sent until another one is received.