sign private channels with additional user data payload

Pusher accepts js clients to use the same auth endpoint to both presence
and private channels.
This commit is contained in:
Jonhnny Weslley
2016-01-24 12:43:06 -03:00
parent 8bf0786cb5
commit a77fb791f7
+1 -1
View File
@@ -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)
}