Software /
code /
prosody
Diff
plugins/mod_websocket.lua @ 7944:36a9a4af1873
Merge 0.10->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 02 Mar 2017 23:03:02 +0100 |
parent | 7938:3629f03817f8 |
child | 8052:f83a2d4826fb |
line wrap: on
line diff
--- a/plugins/mod_websocket.lua Wed Mar 01 02:38:05 2017 +0100 +++ b/plugins/mod_websocket.lua Thu Mar 02 23:03:02 2017 +0100 @@ -51,13 +51,17 @@ local c2s_listener = portmanager.get_service("c2s").listener; --- Session methods -local function session_open_stream(session) +local function session_open_stream(session, from, to) local attr = { xmlns = xmlns_framing, + ["xml:lang"] = "en", version = "1.0", id = session.streamid or "", - from = session.host + from = from or session.host, to = to, }; + if session.stream_attrs then + session:stream_attrs(from, to, attr) + end session.send(st.stanza("open", attr)); end