From e38223499f2f1b551f195d58ab632d985504e3d2 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Wed, 13 Dec 2017 17:31:31 +0100 Subject: mod_bosh: Use module API to fire events --- plugins/mod_bosh.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua index 2cac7385..2525d975 100644 --- a/plugins/mod_bosh.lua +++ b/plugins/mod_bosh.lua @@ -326,7 +326,7 @@ function stream_callbacks.streamopened(context, attr) 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 @@ function stream_callbacks.streamopened(context, attr) 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 -- cgit v1.2.3