Smack 4.2 does not include jabber:client in outgoing stanzas

172 Views Asked by At

I am using Smack 4.2 to implement a fairly basic XMPP chat client. I am using Prosody XMPP server. Prosody is fairly strict about requiring "xmlns=jabber:client" in all incoming stanzas. Smack 4.2 does not include this attribute in its outgoing stanzas. I have tried extending Bind and Session stanzas, and I can make the connection work that way. But, now I am getting into joining rooms, and I really dont want to modify Smack's MUC code so that it can accept a modified Presence message.

Please help!!

2

There are 2 best solutions below

0
Rubycon On

I do not know why Prosody server requires it, there is nothing about it in official XEP-0045 standard https://xmpp.org/extensions/xep-0045.html#enter

Maybe there is a way to disable it at Prosody side somehow

1
gmemon On

Smack 4.3 does add xmlns to every outgoing IQ: https://github.com/igniterealtime/Smack/blob/master/smack-core/src/main/java/org/jivesoftware/smack/packet/Stanza.java#L518

So that at least solves the xmlns problem.