Software /
code /
prosody
Changeset
8493:d424fe42b4d2
mod_bosh: Use module API to fire events
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 13 Dec 2017 17:31:31 +0100 |
parents | 8492:2dd07828ede1 |
children | 8495:c494e12ce81f |
files | plugins/mod_bosh.lua |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_bosh.lua Wed Dec 13 15:23:29 2017 +0100 +++ b/plugins/mod_bosh.lua Wed Dec 13 17:31:31 2017 +0100 @@ -326,7 +326,7 @@ session.log("debug", "BOSH session created for request from %s", session.ip); log("info", "New BOSH session, assigned it sid '%s'", sid); - hosts[session.host].events.fire_event("bosh-session", { session = session, request = request }); + module:fire_event("bosh-session", { session = session, request = request }); -- Send creation response local creating_session = true; @@ -427,7 +427,7 @@ if session.notopen then local features = st.stanza("stream:features"); - hosts[session.host].events.fire_event("stream-features", { origin = session, features = features }); + module:fire_event("stream-features", { origin = session, features = features }); session.send(features); session.notopen = nil; end