--- a/mod_e2e_policy/mod_e2e_policy.lua Wed Aug 08 12:49:02 2018 +0100
+++ b/mod_e2e_policy/mod_e2e_policy.lua Wed Aug 08 15:20:52 2018 +0200
@@ -37,13 +37,13 @@
end
-- no valid encryption found
if e2e_policy_chat == "optional" and event.stanza.attr.type ~= "groupchat" then
- event.origin.send(st.message({ from = host, type = "headline" }, e2e_policy_message_optional_chat));
+ event.origin.send(st.message({ from = host, to = event.stanza.attr.from, type = "headline" }, e2e_policy_message_optional_chat));
end
if e2e_policy_chat == "required" and event.stanza.attr.type ~= "groupchat" then
return event.origin.send(st.error_reply(event.stanza, "modify", "policy-violation", e2e_policy_message_required_chat));
end
if e2e_policy_muc == "optional" and event.stanza.attr.type == "groupchat" then
- event.origin.send(st.message({ from = host, type = "headline" }, e2e_policy_message_optional_muc));
+ event.origin.send(st.message({ from = host, to = event.stanza.attr.from, type = "headline" }, e2e_policy_message_optional_muc));
end
if e2e_policy_muc == "required" and event.stanza.attr.type == "groupchat" then
return event.origin.send(st.error_reply(event.stanza, "modify", "policy-violation", e2e_policy_message_required_muc));