# HG changeset patch
# User Waqas Hussain <waqas20@gmail.com>
# Date 1276122361 -18000
# Node ID 01da55cffcfba4383b915bcbf2de5ac8c885b1ed
# Parent  b3772f9bc3594fd1225f7420aebfcd07668a1070
mod_privacy: Workaround for a traceback.

diff -r b3772f9bc359 -r 01da55cffcfb plugins/mod_privacy.lua
--- 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);