mod_privacy: Workaround for a traceback.

Thu, 10 Jun 2010 03:26:01 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Thu, 10 Jun 2010 03:26:01 +0500
changeset 3221
01da55cffcfb
parent 3220
b3772f9bc359
child 3222
d0525df563c0

mod_privacy: Workaround for a traceback.

plugins/mod_privacy.lua file | annotate | diff | comparison | revisions
--- a/plugins/mod_privacy.lua	Wed Jun 09 21:27:43 2010 +0100
+++ b/plugins/mod_privacy.lua	Thu Jun 10 03:26:01 2010 +0500
@@ -438,7 +438,9 @@
 		 	e.stanza.attr.from = e.stanza.attr.from .. "/" .. session.resource;
 		end
 	end
-	return checkIfNeedToBeBlocked(e, session);
+	if session.username then -- FIXME do properly
+		return checkIfNeedToBeBlocked(e, session);
+	end
 end
 
 module:hook("pre-message/full", preCheckOutgoing, 500);

mercurial