mod_privacy: Workaround for a traceback.
authorWaqas Hussain <waqas20@gmail.com>
Wed, 9 Jun 2010 22:26:01 +0000 (03:26 +0500)
committerWaqas Hussain <waqas20@gmail.com>
Wed, 9 Jun 2010 22:26:01 +0000 (03:26 +0500)
plugins/mod_privacy.lua

index ca5d51fa0a5b850ff3689363c95de87761ebbd72..8dbc2bc48d359e100ce08325076e7a288c20c859 100644 (file)
@@ -438,7 +438,9 @@ function preCheckOutgoing(e)
                        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);