diff options
author | Waqas Hussain <waqas20@gmail.com> | 2009-05-19 01:07:03 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2009-05-19 01:07:03 +0500 |
commit | ad2660e96e9f4d839c385583e548eb5edd14767c (patch) | |
tree | d0e61ebf5ac60be5dd0a8c457363abadddceeb69 /core | |
parent | b782b7ad9249b259bcdc646732129828d6101b62 (diff) | |
download | prosody-ad2660e96e9f4d839c385583e548eb5edd14767c.tar.gz prosody-ad2660e96e9f4d839c385583e548eb5edd14767c.zip |
stanza_router: Handle outbound presence if inbound handlers don't catch it
Diffstat (limited to 'core')
-rw-r--r-- | core/stanza_router.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/stanza_router.lua b/core/stanza_router.lua index 1a9fb26c..6fa41232 100644 --- a/core/stanza_router.lua +++ b/core/stanza_router.lua @@ -123,7 +123,9 @@ function core_post_stanza(origin, stanza) 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); |