Deauthenticate websockets and set status to offline when user account deactivated (#4551)

This commit is contained in:
Joram Wilander
2016-11-15 10:38:58 -05:00
committed by enahum
parent 526c392aad
commit 9c36ca9aca
4 changed files with 38 additions and 5 deletions

View File

@@ -63,7 +63,7 @@ func (wr *WebSocketRouter) ServeWebSocket(conn *WebConn, r *model.WebSocketReque
return
}
if conn.SessionToken == "" {
if !conn.isAuthenticated() {
err := model.NewLocAppError("ServeWebSocket", "api.web_socket_router.not_authenticated.app_error", nil, "")
wr.ReturnWebSocketError(conn, r, err)
return