From 00f021695cb9253a6a33f00a06e3036041a47a92 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Tue, 2 Jun 2009 20:15:18 +0500 Subject: mod_presence: Fix a global access --- plugins/mod_presence.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/mod_presence.lua b/plugins/mod_presence.lua index eb2ccb05..62300062 100644 --- a/plugins/mod_presence.lua +++ b/plugins/mod_presence.lua @@ -305,8 +305,8 @@ module:hook("presence/bare", function(data) 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; -- cgit v1.2.3