Diff

plugins/muc/subject.lib.lua @ 11200:bf8f2da84007

Merge 0.11->trunk
author Kim Alvefur <zash@zash.se>
date Thu, 05 Nov 2020 22:31:25 +0100
parent 11141:a5acd6354845
child 12977:74b9e05af71e
line wrap: on
line diff
--- a/plugins/muc/subject.lib.lua	Thu Nov 05 22:27:17 2020 +0100
+++ b/plugins/muc/subject.lib.lua	Thu Nov 05 22:31:25 2020 +0100
@@ -94,6 +94,12 @@
 	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