Muc messages with subject and body dropped if subject is current room subject

XEP-0045 (Multi-User Chat), section 8.1 specifies that:

The subject is changed by sending a message of type “groupchat” to the <room@service>, containing no body but a <subject/> that specifies the new subject (emphasis mine).

src/java/org/jivesoftware/openfire/muc/spi/MUCUserImpl.java has the following code:

if (packet.getSubject() != null && packet.getSubject().trim().length() > 0 && Message.Type.groupchat == packet.getType()){

// An occupant is trying to change the room’s subject

role.getChatRoom().changeSubject(packet, role);

}

This does not check to make sure that there is no body before calling changeSubject().

changeSubject() drops messages if they are trying to set the subject to what it already is, which makes sense, but if a body is specified then the message shouldn’t be treated as a subject change, and should not be dropped.

Thanks for the bug report. The problem has been filed as JM-1144 and it’s fixed for 3.4.0.

Regards,

– Gato

And thanks for the fix. I’m quite impressed by the turnaround time.