baiwyc119 / lxmppd

Automatically exported from code.google.com/p/lxmppd
0 stars 0 forks source link

Smack MUC extension is broken on room creation, maybe other cases #438

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
MUC presence can have multiple status codes. For example a room creating 
presence response has both status code 110 (it's your own presence) and 201 
(it's a room creation presence):
 http://xmpp.org/extensions/xep-0045.html#example-154

Smack code assumes there's just one status code in muc#user presences. Smack 
picks the last status code. When creating a room with Smack, Prosody sends 201, 
110. Smack finds that the last status is 110, not 201, and throws an exception.

Relevant Smack code is here:
 https://github.com/igniterealtime/Smack/blob/6a43fc7c36b22b1d050cdfe7b4ab715a58da540c/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChat.java#L396

The relevant Smack code was committed on 2004-07-06. The XEP may have been 
different back then, though probably not. Issue known to occur with 
prosody-trunk. Older Prosody sent statuses in a different order in the 
room-create case.

Original issue reported on code.google.com by waqas20 on 3 Sep 2014 at 10:35

GoogleCodeExporter commented 9 years ago
"Added status codes for occupant's own roomnick, service-modified roomnick, and 
warning that room discussion is publicly logged." - Version 1.21 (2006-09-13)

Original comment by waqas20 on 3 Sep 2014 at 10:41

GoogleCodeExporter commented 9 years ago
Related Smack Issue: https://igniterealtime.org/issues/browse/SMACK-604

Original comment by fschm...@gmail.com on 4 Sep 2014 at 9:44