aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_websocket.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2020-01-24 16:21:30 +0000
committerMatthew Wild <mwild1@gmail.com>2020-01-24 16:21:30 +0000
commit1b8229790ea4d2dd66fae2662406089a94060bbc (patch)
tree96b0bbc81e50d0746c5bec4fb53ac077ba784f11 /plugins/mod_websocket.lua
parent5d9270502bcf1309d9718cb55873292296eebf70 (diff)
downloadprosody-1b8229790ea4d2dd66fae2662406089a94060bbc.tar.gz
prosody-1b8229790ea4d2dd66fae2662406089a94060bbc.zip
mod_websocket: Fire event on session creation (thanks Aaron van Meerten)
Diffstat (limited to 'plugins/mod_websocket.lua')
-rw-r--r--plugins/mod_websocket.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/mod_websocket.lua b/plugins/mod_websocket.lua
index 101039e1..4d3e79bb 100644
--- a/plugins/mod_websocket.lua
+++ b/plugins/mod_websocket.lua
@@ -292,6 +292,8 @@ function handle_request(event)
response.headers.sec_webSocket_accept = base64(sha1(request.headers.sec_websocket_key .. "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"));
response.headers.sec_webSocket_protocol = "xmpp";
+ module:fire_event("websocket-session", { session = session, request = request });
+
session.log("debug", "Sending WebSocket handshake");
return "";