plugins/mod_presence.lua

changeset 2834
f5cd7ee409eb
parent 2259
22417227d2ce
child 2525
e385511b3a54
equal deleted inserted replaced
2833:a82bd02d5918 2834:f5cd7ee409eb
307 elseif not t or t == "unavailable" then 307 elseif not t or t == "unavailable" then
308 handle_normal_presence(origin, stanza, core_route_stanza); 308 handle_normal_presence(origin, stanza, core_route_stanza);
309 end 309 end
310 return true; 310 return true;
311 end); 311 end);
312 module:hook("presence/host", function (data)
313 local stanza = data.stanza;
314 local reply = st.reply(stanza);
315 reply.attr.type = "unsubscribed";
316 handle_inbound_presence_subscriptions_and_probes(data.origin, reply, jid_bare(stanza.attr.to), jid_bare(stanza.attr.from), core_route_stanza);
317 return true;
318 end);
312 module:hook("presence/full", function(data) 319 module:hook("presence/full", function(data)
313 -- inbound presence to full JID recieved 320 -- inbound presence to full JID recieved
314 local origin, stanza = data.origin, data.stanza; 321 local origin, stanza = data.origin, data.stanza;
315 322
316 local t = stanza.attr.type; 323 local t = stanza.attr.type;

mercurial