aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
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
commit70e9ff3887f78b7ce8ea5487c5c7b9bdc128a7d9 (patch)
tree78e2c721cee05c8b83cc940dd2cd7b6253fe24e8 /plugins
parent8a032412450f7dabaed77359dac45d4450662951 (diff)
downloadprosody-70e9ff3887f78b7ce8ea5487c5c7b9bdc128a7d9.tar.gz
prosody-70e9ff3887f78b7ce8ea5487c5c7b9bdc128a7d9.zip
mod_websocket: Fire event on session creation (thanks Aaron van Meerten)
Diffstat (limited to 'plugins')
-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 6625c676..177259e6 100644
--- a/plugins/mod_websocket.lua
+++ b/plugins/mod_websocket.lua
@@ -305,6 +305,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 "";