# HG changeset patch # User Kim Alvefur # Date 1513182691 -3600 # Node ID d424fe42b4d296f99353b13ebc57687ae1479862 # Parent 2dd07828ede1f7fee1d7693656bc852c693bc45d mod_bosh: Use module API to fire events diff -r 2dd07828ede1 -r d424fe42b4d2 plugins/mod_bosh.lua --- 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