Software /
code /
prosody
Diff
plugins/muc/subject.lib.lua @ 9684:b2d6b79c9513
MUC/subject: Don't consider messages with <body> or <subject> (fixes #667)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 04 Dec 2018 19:49:31 +0100 |
parent | 9035:173c0e16e704 |
child | 11141:a5acd6354845 |
line wrap: on
line diff
--- a/plugins/muc/subject.lib.lua Tue Dec 04 16:19:58 2018 +0000 +++ b/plugins/muc/subject.lib.lua Tue Dec 04 19:49:31 2018 +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