Skip to content

Commit

Permalink
mod_websocket: Fire event on session creation (thanks Aaron van Meerten)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwild1 committed Jan 24, 2020
1 parent a703f27 commit 1977d05
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/mod_websocket.lua
Expand Up @@ -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 "";
Expand Down

0 comments on commit 1977d05

Please sign in to comment.