271 module.unload = function() |
271 module.unload = function() |
272 prosody.events.remove_handler(module:get_host().."/presence", presence_handler); |
272 prosody.events.remove_handler(module:get_host().."/presence", presence_handler); |
273 end |
273 end |
274 |
274 |
275 local outbound_presence_handler = function(data) |
275 local outbound_presence_handler = function(data) |
276 -- outbound presence to full JID recieved |
276 -- outbound presence to recieved |
277 local origin, stanza = data.origin, data.stanza; |
277 local origin, stanza = data.origin, data.stanza; |
278 |
278 |
279 local t = stanza.attr.type; |
279 local t = stanza.attr.type; |
280 if t ~= nil and t ~= "unavailable" and t ~= "error" then -- check for subscriptions and probes sent to full JID |
280 if t ~= nil and t ~= "unavailable" and t ~= "error" then -- check for subscriptions and probes sent to full JID |
281 handle_outbound_presence_subscriptions_and_probes(origin, stanza, jid_bare(stanza.attr.from), jid_bare(stanza.attr.to), core_route_stanza); |
281 handle_outbound_presence_subscriptions_and_probes(origin, stanza, jid_bare(stanza.attr.from), jid_bare(stanza.attr.to), core_route_stanza); |