From a77fb791f795555d84bb4bafa8e13b8071b33401 Mon Sep 17 00:00:00 2001 From: Jonhnny Weslley Date: Sun, 24 Jan 2016 12:40:40 -0300 Subject: [PATCH] sign private channels with additional user data payload Pusher accepts js clients to use the same auth endpoint to both presence and private channels. --- ipe/websockets.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipe/websockets.go b/ipe/websockets.go index 1106ca7..3d6681d 100644 --- a/ipe/websockets.go +++ b/ipe/websockets.go @@ -129,7 +129,7 @@ func onMessage(conn *websocket.Conn, w http.ResponseWriter, r *http.Request, ses if isPresence || isPrivate { toSign := []string{connection.SocketID, channelName} - if isPresence { + if isPresence || len(subscribeEvent.Data.ChannelData) > 0 { toSign = append(toSign, subscribeEvent.Data.ChannelData) }