[MM-40638] Type all of the websocket event names as a new type WebsocketEventType (#25454)
Co-authored-by: Sudheer Tripathi <sudheer@clearglass.com> Co-authored-by: Sudheer Tripathi <31629433+sudheer121@users.noreply.github.com> Co-authored-by: Sudheer Tripathi <tripathisudheer604@gmail.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
e1f72576fb
Коммит
51e73b681b
@@ -111,7 +111,7 @@ func makeClient(dialer *websocket.Dialer, url, connectURL, authToken string, hea
|
||||
client.configurePingHandling()
|
||||
go client.writer()
|
||||
|
||||
client.SendMessage(WebsocketAuthenticationChallenge, map[string]any{"token": authToken})
|
||||
client.SendMessage(string(WebsocketAuthenticationChallenge), map[string]any{"token": authToken})
|
||||
|
||||
return client, nil
|
||||
}
|
||||
@@ -157,7 +157,7 @@ func (wsc *WebSocketClient) ConnectWithDialer(dialer *websocket.Dialer) *AppErro
|
||||
wsc.EventChannel = make(chan *WebSocketEvent, 100)
|
||||
wsc.ResponseChannel = make(chan *WebSocketResponse, 100)
|
||||
|
||||
wsc.SendMessage(WebsocketAuthenticationChallenge, map[string]any{"token": wsc.AuthToken})
|
||||
wsc.SendMessage(string(WebsocketAuthenticationChallenge), map[string]any{"token": wsc.AuthToken})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user