xmppjs / hubot-xmpp

XMPP adapter for Hubot
181 stars 103 forks source link

Rejoin all channels after receiving 406 from the server #109

Open sokoow opened 8 years ago

sokoow commented 8 years ago

I got something like this received from the server:

[Sat Jun 18 2016 04:31:11 GMT+0200 (CEST)] ERROR [xmpp error]<message to="droid@puczat.pl/2d0lgyorvi" type="error" from="public@conference.puczat.pl" xmlns:stream="http://etherx.jabber.org/streams"><body>heniek: Zegnaj</body><error code="406" type="modify"><not-acceptable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></message>

and then the bot just sits there connected to the server, but disconnected from the channel. Some sort of retry logic on errors should be implemented please.

markstory commented 8 years ago

What caused the 406 error?

sokoow commented 8 years ago

It's openfire so all strange stuff comes out of it, basically it looks like one of users have IMed the bot and then it got 406

markstory commented 8 years ago

That's annoying. I don't use openfire, and I've never seen this behavior with ejabberd. If you can put together a fix I'm happy to help with tests.

JeffZane commented 1 week ago
{"appScUrl":"","deployDevice":"","deployName":"","deployTarget":"","id":"d0e9adae-baef-4a97-a7f6-18e2414286f6","imei":"","lat":"","messageType":"text","path":"","scUrl":"","searchScore":0.0,"senderJid":"1716341926932@zed","senderName":"cs9","showType":"","text":"147","time":"2024-06-27 16:25:26","toJid":"fb3591c7120647c5b5f43731cab59f1b@conference.zed","toName":"群组cs1220240627162117","userId":"1716341926932","uuid":"d0e9adae-baef-4a97-a7f6-18e2414286f6"}