aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc/subject.lib.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2020-09-30 09:50:33 +0100
committerMatthew Wild <mwild1@gmail.com>2020-09-30 09:50:33 +0100
commit785c20f6ee7e61a5a91a8b6259623bc2a2bbffaa (patch)
tree3a37db7b805b1555d08cc61c7938cf512ff35ce0 /plugins/muc/subject.lib.lua
parente55d037cdf89efac99c6144b381c9fa880f7fb93 (diff)
parentb80ff2ae4f86aa26e055890a8284b55170ef2056 (diff)
downloadprosody-785c20f6ee7e61a5a91a8b6259623bc2a2bbffaa.tar.gz
prosody-785c20f6ee7e61a5a91a8b6259623bc2a2bbffaa.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