Mercurial > prosody-hg
comparison plugins/mod_presence.lua @ 1287:ac82c7b9c76b
mod_presence: Fix a global access
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Tue, 02 Jun 2009 20:15:18 +0500 |
| parents | a9b1675ad16e |
| children | d14de6cb8b5b |
comparison
equal
deleted
inserted
replaced
| 1286:a9b1675ad16e | 1287:ac82c7b9c76b |
|---|---|
| 303 module:hook("presence/bare", function(data) | 303 module:hook("presence/bare", function(data) |
| 304 -- inbound presence to bare JID recieved | 304 -- inbound presence to bare JID recieved |
| 305 local origin, stanza = data.origin, data.stanza; | 305 local origin, stanza = data.origin, data.stanza; |
| 306 | 306 |
| 307 local to = stanza.attr.to; | 307 local to = stanza.attr.to; |
| 308 local t = stanza.attr.type; | |
| 308 if to then | 309 if to then |
| 309 local t = stanza.attr.type; | |
| 310 if t ~= nil and t ~= "unavailable" and t ~= "error" then -- check for subscriptions and probes sent to bare JID | 310 if t ~= nil and t ~= "unavailable" and t ~= "error" then -- check for subscriptions and probes sent to bare JID |
| 311 handle_inbound_presence_subscriptions_and_probes(origin, stanza, jid_bare(stanza.attr.from), jid_bare(stanza.attr.to), core_route_stanza); | 311 handle_inbound_presence_subscriptions_and_probes(origin, stanza, jid_bare(stanza.attr.from), jid_bare(stanza.attr.to), core_route_stanza); |
| 312 return true; | 312 return true; |
| 313 end | 313 end |
| 314 | 314 |
