Software / code / prosody
Comparison
plugins/mod_presence.lua @ 1284:c0fb8379696e
mod_presence: return true from incoming presence handlers to prevent further processing
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Tue, 02 Jun 2009 16:22:37 +0500 |
| parent | 1283:2e57f2176612 |
| child | 1285:0a6e2d6ae459 |
comparison
equal
deleted
inserted
replaced
| 1283:2e57f2176612 | 1284:c0fb8379696e |
|---|---|
| 319 end | 319 end |
| 320 end -- no resources not online, discard | 320 end -- no resources not online, discard |
| 321 else | 321 else |
| 322 handle_normal_presence(origin, stanza, core_route_stanza); | 322 handle_normal_presence(origin, stanza, core_route_stanza); |
| 323 end | 323 end |
| 324 return true; | |
| 324 end); | 325 end); |
| 325 module:hook("presence/full", function(data) | 326 module:hook("presence/full", function(data) |
| 326 -- inbound presence to full JID recieved | 327 -- inbound presence to full JID recieved |
| 327 local origin, stanza = data.origin, data.stanza; | 328 local origin, stanza = data.origin, data.stanza; |
| 328 | 329 |
| 335 local session = full_sessions[stanza.attr.to]; | 336 local session = full_sessions[stanza.attr.to]; |
| 336 if session then | 337 if session then |
| 337 -- TODO fire post processing event | 338 -- TODO fire post processing event |
| 338 session.send(stanza); | 339 session.send(stanza); |
| 339 end -- resource not online, discard | 340 end -- resource not online, discard |
| 341 return true; | |
| 340 end); | 342 end); |