aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiquel Lionel <lionel@les-miquelots.net>2024-03-31 22:27:22 +0200
committerMiquel Lionel <lionel@les-miquelots.net>2024-04-01 12:44:02 +0200
commit1ad05d75823ce34eab29b05a9330818422fe4195 (patch)
tree6b1b6f72a7b7e4efbf7a75c272934c08e8adbbbf
parentbd8e03b7ea8edd3114423e3426b766d78ccd0724 (diff)
downloaddino-1ad05d75823ce34eab29b05a9330818422fe4195.tar.gz
dino-1ad05d75823ce34eab29b05a9330818422fe4195.zip
Fix malformed message stanzas changing MUC subjectignore-subject-if-w-thread-or-message-node
- 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 <subject/> element; only a message that contains a <subject/> but no <body/> element shall be considered a subject change for MUC purposes."
-rw-r--r--xmpp-vala/src/module/xep/0045_muc/module.vala2
1 files changed, 1 insertions, 1 deletions
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);