XEP says thread means not the topic

Note: A message with a <subject/> and a <body/> or a <subject/> and a
<thread/> is a legitimate message, but it SHALL NOT be interpreted as a
subject change.
This commit is contained in:
Stephen Paul Weber 2024-01-23 13:38:13 -05:00 committed by Daniel Gultsch
parent a63b419e58
commit 961a024aa2

View file

@ -790,7 +790,7 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece
}
if (isTypeGroupChat) {
if (packet.hasChild("subject")) { //TODO usually we would want to check for lack of body; however some servers do set a body :(
if (packet.hasChild("subject") && !packet.hasChild("thread")) { // We already know it has no body per above
if (conversation != null && conversation.getMode() == Conversation.MODE_MULTI) {
conversation.setHasMessagesLeftOnServer(conversation.countMessages() > 0);
final LocalizedContent subject = packet.findInternationalizedChildContentInDefaultNamespace("subject");