diff options
author | eerielili <lionel@les-miquelots.net> | 2024-04-01 11:33:11 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-01 13:33:11 +0200 |
commit | d9fa4daa6a7d16f5f0e2183a77ee2d07849dd9f3 (patch) | |
tree | 6b1b6f72a7b7e4efbf7a75c272934c08e8adbbbf /xmpp-vala/src/module | |
parent | bd8e03b7ea8edd3114423e3426b766d78ccd0724 (diff) | |
download | dino-d9fa4daa6a7d16f5f0e2183a77ee2d07849dd9f3.tar.gz dino-d9fa4daa6a7d16f5f0e2183a77ee2d07849dd9f3.zip |
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 <subject/> element; only a message that
contains a <subject/> but no <body/> element shall be considered a
subject change for MUC purposes."
Diffstat (limited to 'xmpp-vala/src/module')
-rw-r--r-- | xmpp-vala/src/module/xep/0045_muc/module.vala | 2 |
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); |