From 961a024aa22d70a57c27bfd4acd958d96d7ecd22 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Tue, 23 Jan 2024 13:38:13 -0500 Subject: [PATCH] XEP says thread means not the topic Note: A message with a and a or a and a is a legitimate message, but it SHALL NOT be interpreted as a subject change. --- src/main/java/eu/siacs/conversations/parser/MessageParser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java index 97910f3bb..bf3cba178 100644 --- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java +++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java @@ -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");