-
- -- 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,
- wait = attr.wait,
- inactivity = tostring(BOSH_DEFAULT_INACTIVITY),
- polling = tostring(BOSH_DEFAULT_POLLING),
- requests = tostring(BOSH_DEFAULT_REQUESTS),
- hold = tostring(session.bosh_hold),
- sid = sid, authid = sid,
- ver = '1.6', from = session.host,
- secure = 'true', ["xmpp:version"] = "1.0",
- ["xmlns:xmpp"] = "urn:xmpp:xbosh",
- ["xmlns:stream"] = "http://etherx.jabber.org/streams"
- }):add_child(features);
- request:send{ headers = default_headers, body = tostring(response) };
-