diff mod_privacy/mod_privacy.lua @ 45:3f5bbd7c90d4

mod_privacy: it says "from" not "form" (thx flo for reporting!)
author Thilo Cestonaro <thilo@cestona.ro>
date Fri, 16 Oct 2009 20:51:14 +0200
parents bbb3d3a90a70
children ea756d96584f
line wrap: on
line diff
--- a/mod_privacy/mod_privacy.lua	Fri Oct 16 01:37:10 2009 +0200
+++ b/mod_privacy/mod_privacy.lua	Fri Oct 16 20:51:14 2009 +0200
@@ -323,7 +323,7 @@
 	local privacy_lists = datamanager.load(session.username, session.host, "privacy") or {};
 	local bare_jid = session.username.."@"..session.host;
 
-	module:log("debug", "stanza: %s, to: %s, form: %s", stanza.name, stanza.attr.to or "nil", stanza.attr.from or "nil");
+	module:log("debug", "stanza: %s, to: %s, from: %s", stanza.name, stanza.attr.to or "nil", stanza.attr.from or "nil");
 	
 	if stanza.attr.to ~= nil and stanza.attr.from ~= nil then
 		if privacy_lists.lists == nil or
@@ -456,9 +456,9 @@
 function preCheckOutgoing(e)
 	local session = e.origin;
 	if e.stanza.attr.from == nil then
-		e.stanza.attr.form = session.username .. "@" .. session.host;
+		e.stanza.attr.from = session.username .. "@" .. session.host;
 		if session.resource ~= nil then
-		 	e.stanza.attr.from = e.stanza.attr.form .. "/" .. session.resource;
+		 	e.stanza.attr.from = e.stanza.attr.from .. "/" .. session.resource;
 		end
 	end
 	return checkIfNeedToBeBlocked(e, session);