# HG changeset patch # User Matthew Wild # Date 1579882890 0 # Node ID 2bc91899961567d5fb0fbf23ad2dcc44ecaf57ed # Parent 431511e190bc6d98eccfec991e177bca3d7bef4c mod_websocket: Fire event on session creation (thanks Aaron van Meerten) diff -r 431511e190bc -r 2bc918999615 plugins/mod_websocket.lua --- 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 "";