aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_websocket.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-03-02 23:03:02 +0100
committerKim Alvefur <zash@zash.se>2017-03-02 23:03:02 +0100
commit8b9646fee679b47520503b7eaafff9539a3ea3f2 (patch)
tree4b71bdc7622635a101579c04b2d9e0c56991df2c /plugins/mod_websocket.lua
parent55ba289bedc1580f49af034b8a849958b698de77 (diff)
parentc0937dcdb42f9ac2fc928aa91f1474607b735590 (diff)
downloadprosody-8b9646fee679b47520503b7eaafff9539a3ea3f2.tar.gz
prosody-8b9646fee679b47520503b7eaafff9539a3ea3f2.zip
Merge 0.10->trunk
Diffstat (limited to 'plugins/mod_websocket.lua')
-rw-r--r--plugins/mod_websocket.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/mod_websocket.lua b/plugins/mod_websocket.lua
index 47d170a1..3c96f780 100644
--- a/plugins/mod_websocket.lua
+++ b/plugins/mod_websocket.lua
@@ -51,13 +51,17 @@ local sessions = module:shared("c2s/sessions");
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