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:
+1
-1
@@ -129,7 +129,7 @@ func onMessage(conn *websocket.Conn, w http.ResponseWriter, r *http.Request, ses
|
|||||||
if isPresence || isPrivate {
|
if isPresence || isPrivate {
|
||||||
toSign := []string{connection.SocketID, channelName}
|
toSign := []string{connection.SocketID, channelName}
|
||||||
|
|
||||||
if isPresence {
|
if isPresence || len(subscribeEvent.Data.ChannelData) > 0 {
|
||||||
toSign = append(toSign, subscribeEvent.Data.ChannelData)
|
toSign = append(toSign, subscribeEvent.Data.ChannelData)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user