aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-12-13 17:31:31 +0100
committerKim Alvefur <zash@zash.se>2017-12-13 17:31:31 +0100
commite38223499f2f1b551f195d58ab632d985504e3d2 (patch)
tree701ffc8b3341c6d194fb308f8252f1620b399b21
parent91410ee072c2bde675d87bbb1c5e71a99f1f6bc7 (diff)
downloadprosody-e38223499f2f1b551f195d58ab632d985504e3d2.tar.gz
prosody-e38223499f2f1b551f195d58ab632d985504e3d2.zip
mod_bosh: Use module API to fire events
-rw-r--r--plugins/mod_bosh.lua4
1 files changed, 2 insertions, 2 deletions
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