changeset 3386:a76c420eca61

mod_e2e_policy: Fix an error with getting stanza from event
author Michel Le Bihan <michel@lebihan.pl>
date Fri, 30 Nov 2018 19:31:25 +0100
parents 762c7e7ee64b
children c5e8042b174c
files mod_e2e_policy/mod_e2e_policy.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_e2e_policy/mod_e2e_policy.lua	Fri Nov 30 19:17:16 2018 +0100
+++ b/mod_e2e_policy/mod_e2e_policy.lua	Fri Nov 30 19:31:25 2018 +0100
@@ -12,7 +12,7 @@
 
 function warn_on_plaintext_messages(event)
     -- check if JID is whitelisted
-    if e2e_policy_whitelist:contains(jid_bare(stanza.attr.from)) or e2e_policy_whitelist:contains(jid_bare(stanza.attr.to)) then
+    if e2e_policy_whitelist:contains(jid_bare(event.stanza.attr.from)) or e2e_policy_whitelist:contains(jid_bare(event.stanza.attr.to)) then
         return nil;
     end
     local body = event.stanza:get_child_text("body");