Mercurial > prosody-hg
comparison plugins/mod_presence.lua @ 2834:f5cd7ee409eb
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 |
| parents | 22417227d2ce |
| children | e385511b3a54 |
comparison
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; |
