diff options
author | Kim Alvefur <zash@zash.se> | 2018-12-04 19:49:31 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-12-04 19:49:31 +0100 |
commit | c250892998c3734ed355b60ff3975279eaef7a9d (patch) | |
tree | abda3ecfc5f6930a74a873d2547100008208c732 /plugins/muc/subject.lib.lua | |
parent | bd19b153479f2f54ce4357398091a8513afd8506 (diff) | |
download | prosody-c250892998c3734ed355b60ff3975279eaef7a9d.tar.gz prosody-c250892998c3734ed355b60ff3975279eaef7a9d.zip |
MUC/subject: Don't consider messages with <body> or <subject> (fixes #667)
Diffstat (limited to 'plugins/muc/subject.lib.lua')
-rw-r--r-- | plugins/muc/subject.lib.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/muc/subject.lib.lua b/plugins/muc/subject.lib.lua index 938abf61..c8b99cc7 100644 --- a/plugins/muc/subject.lib.lua +++ b/plugins/muc/subject.lib.lua @@ -94,6 +94,12 @@ module:hook("muc-occupant-groupchat", function(event) local stanza = event.stanza; local subject = stanza:get_child("subject"); if subject then + if stanza:get_child("body") or stanza:get_child("thread") then + -- 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. + return; + end local room = event.room; local occupant = event.occupant; -- Role check for subject changes |