Software /
code /
prosody
Comparison
plugins/mod_presence.lua @ 2461:a6a50cf0e444
mod_presence: Automatically deny presence requests for hosts, fixes traceback in #153
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 18 Jan 2010 17:14:41 +0000 |
parent | 2259:22417227d2ce |
child | 2525:e385511b3a54 |
comparison
equal
deleted
inserted
replaced
2460:2a80ba15c210 | 2461:a6a50cf0e444 |
---|---|
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; |