plugins/mod_presence.lua

changeset 1280
e360fef8882b
parent 1279
fa00d56a9fd3
child 1281
bc65d57c76ef
equal deleted inserted replaced
1279:fa00d56a9fd3 1280:e360fef8882b
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);

mercurial