mod_bosh: Fire stream-features event using new events API.

This commit is contained in:
Waqas Hussain 2010-02-12 04:11:50 +05:00
parent 4233a8ccf5
commit ffc968aae4

View file

@ -206,6 +206,7 @@ function stream_callbacks.streamopened(request, attr)
-- Send creation response
local features = st.stanza("stream:features");
hosts[session.host].events.fire_event("stream-features", { origin = session, features = features });
fire_event("stream-features", session, features);
--xmpp:version='1.0' xmlns:xmpp='urn:xmpp:xbosh'
local response = st.stanza("body", { xmlns = xmlns_bosh,
@ -257,6 +258,7 @@ function stream_callbacks.streamopened(request, attr)
if session.notopen then
local features = st.stanza("stream:features");
hosts[session.host].events.fire_event("stream-features", { origin = session, features = features });
fire_event("stream-features", session, features);
session.send(features);
session.notopen = nil;