Software /
code /
prosody
Changeset
1182:89e9f0d555a2
stanza_router: Handle outbound presence if inbound handlers don't catch it
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Tue, 19 May 2009 01:07:03 +0500 |
parents | 1181:dffbb7d1da4b |
children | 1183:565e16ee0c74 |
files | core/stanza_router.lua |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/core/stanza_router.lua Sun May 17 04:50:32 2009 +0500 +++ b/core/stanza_router.lua Tue May 19 01:07:03 2009 +0500 @@ -123,7 +123,9 @@ local to_bare = node and (node.."@"..host) or host; -- bare JID local event_data = {origin=origin, stanza=stanza}; - if fire_event(tostring(host or origin.host).."/"..stanza.name, event_data) then + if host and fire_event(host.."/"..stanza.name, event_data) then + -- event handled + elseif stanza.name == "presence" and origin.host and fire_event(origin.host.."/"..stanza.name, event_data) then -- event handled elseif not to then modules_handle_stanza(host or origin.host or origin.to_host, origin, stanza);