Changeset

10615:2bc918999615

mod_websocket: Fire event on session creation (thanks Aaron van Meerten)
author Matthew Wild <mwild1@gmail.com>
date Fri, 24 Jan 2020 16:21:30 +0000
parents 10614:431511e190bc
children 10617:8941bebd64e4
files plugins/mod_websocket.lua
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_websocket.lua	Fri Jan 24 13:50:02 2020 +0000
+++ b/plugins/mod_websocket.lua	Fri Jan 24 16:21:30 2020 +0000
@@ -292,6 +292,8 @@
 	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 "";