diff options
author | Waqas Hussain <waqas20@gmail.com> | 2010-01-29 21:04:36 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2010-01-29 21:04:36 +0500 |
commit | b7d45c17f2c325f55ef9cb27b1896d4b7ee8d324 (patch) | |
tree | a3a79f97c57d647cc2d110a6cc15f8fd76d49988 /core | |
parent | d77c415e7641d865bcea11d87b68d1c75cbc81f3 (diff) | |
download | prosody-b7d45c17f2c325f55ef9cb27b1896d4b7ee8d324.tar.gz prosody-b7d45c17f2c325f55ef9cb27b1896d4b7ee8d324.zip |
stanza_router: Added third parameter to core_post_stanza, to control pre-events.
Diffstat (limited to 'core')
-rw-r--r-- | core/stanza_router.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/stanza_router.lua b/core/stanza_router.lua index b60ff2b5..b025511e 100644 --- a/core/stanza_router.lua +++ b/core/stanza_router.lua @@ -98,7 +98,7 @@ function core_process_stanza(origin, stanza) return; -- FIXME what should we do here? does this work with subdomains? end end - core_post_stanza(origin, stanza); + core_post_stanza(origin, stanza, origin.full_jid); else local h = hosts[stanza.attr.to or origin.host or origin.to_host]; if h then @@ -119,7 +119,7 @@ function core_process_stanza(origin, stanza) end end -function core_post_stanza(origin, stanza) +function core_post_stanza(origin, stanza, preevents) local to = stanza.attr.to; local node, host, resource = jid_split(to); local to_bare = node and (node.."@"..host) or host; -- bare JID @@ -143,7 +143,7 @@ function core_post_stanza(origin, stanza) end local event_data = {origin=origin, stanza=stanza}; - if origin.full_jid == stanza.attr.from then -- c2s connection + if preevents then -- c2s connection if hosts[origin.host].events.fire_event('pre-'..stanza.name..to_type, event_data) then return; end -- do preprocessing end local h = hosts[to_bare] or hosts[host or origin.host]; |