Software /
code /
prosody
Changeset
10616:37936c72846d 0.11
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 | 10610:b9a054ad38e7 |
children | 10617:8941bebd64e4 10618:232841373711 |
files | plugins/mod_websocket.lua |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_websocket.lua Thu Jan 23 21:59:13 2020 +0000 +++ b/plugins/mod_websocket.lua Fri Jan 24 16:21:30 2020 +0000 @@ -305,6 +305,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 "";