Changeset

1287:ac82c7b9c76b

mod_presence: Fix a global access
author Waqas Hussain <waqas20@gmail.com>
date Tue, 02 Jun 2009 20:15:18 +0500
parents 1286:a9b1675ad16e
children 1288:d2dc0954ebfd
files plugins/mod_presence.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_presence.lua	Tue Jun 02 20:10:25 2009 +0500
+++ b/plugins/mod_presence.lua	Tue Jun 02 20:15:18 2009 +0500
@@ -305,8 +305,8 @@
 	local origin, stanza = data.origin, data.stanza;
 
 	local to = stanza.attr.to;
+	local t = stanza.attr.type;
 	if to then
-		local t = stanza.attr.type;
 		if t ~= nil and t ~= "unavailable" and t ~= "error" then -- check for subscriptions and probes sent to bare JID
 			handle_inbound_presence_subscriptions_and_probes(origin, stanza, jid_bare(stanza.attr.from), jid_bare(stanza.attr.to), core_route_stanza);
 			return true;