Mandatory policy should block MUC clear text msg

Signed-off-by: David Goulet <dgoulet@ev0ke.net>
This commit is contained in:
David Goulet 2014-04-13 14:56:34 -04:00
parent 2c34260b99
commit 38d631604a
1 changed files with 2 additions and 2 deletions

View File

@ -58,8 +58,8 @@ local function check_message_otr(event)
-- Continue processing the signal if no body is found since
-- we can't enforce OTR with an empty payload or if the message
-- is meant for a groupchat.
if body == nil or stanza.attr.type == "groupchat" then
-- is meant for a groupchat and the policy does not enforce OTR.
if body == nil or (stanza.attr.type == "groupchat" and not mandatory) then
return nil;
end