From e5302d1d9d6b25ceaf7c623d8fc716610e701ed2 Mon Sep 17 00:00:00 2001 From: eerielili Date: Mon, 1 Apr 2024 11:33:11 +0000 Subject: [PATCH] Fix message stanza with body changing MUC subject (#1569) - fixes https://github.com/dino/dino/issues/1542 - more consistent with https://xmpp.org/extensions/xep-0045.html#enter-subject: "Note: In accordance with the core definition of XML stanzas, any message can contain a element; only a message that contains a but no element shall be considered a subject change for MUC purposes." --- xmpp-vala/src/module/xep/0045_muc/module.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmpp-vala/src/module/xep/0045_muc/module.vala b/xmpp-vala/src/module/xep/0045_muc/module.vala index 2d7ddd14..70912f83 100644 --- a/xmpp-vala/src/module/xep/0045_muc/module.vala +++ b/xmpp-vala/src/module/xep/0045_muc/module.vala @@ -285,7 +285,7 @@ public class Module : XmppStreamModule { private void on_received_message(XmppStream stream, MessageStanza message) { if (message.type_ == MessageStanza.TYPE_GROUPCHAT) { StanzaNode? subject_node = message.stanza.get_subnode("subject"); - if (subject_node != null) { + if (subject_node != null && message.body == null){ string subject = subject_node.get_string_content(); stream.get_flag(Flag.IDENTITY).set_muc_subject(message.from, subject); subject_set(stream, subject, message.from);