aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc/subject.lib.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-07-08 02:44:32 +0200
committerKim Alvefur <zash@zash.se>2019-07-08 02:44:32 +0200
commitf2b49140d8f9309bb3613effbef0739216ba7a9b (patch)
tree6b13265c066c8c32f4ed5d44fc9ca8421d118d06 /plugins/muc/subject.lib.lua
parente081fd664251a2eb7ab68262c2b8a3cad4b381c7 (diff)
parentae48864f9d7368bf2030d391d68d6363278202ea (diff)
downloadprosody-f2b49140d8f9309bb3613effbef0739216ba7a9b.tar.gz
prosody-f2b49140d8f9309bb3613effbef0739216ba7a9b.zip
Merge 0.11->trunk
Diffstat (limited to 'plugins/muc/subject.lib.lua')
-rw-r--r--plugins/muc/subject.lib.lua6
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