|
@@ -41,15 +41,15 @@ func (srv *Server) WebsocketHandler(ctx *gin.Context) {
|
|
|
}
|
|
|
|
|
|
// Check online status
|
|
|
- if on, err := srv.Repositories.OnlineRepository.Is(ctx, id); err != nil {
|
|
|
- zlog.Error(err)
|
|
|
- ctx.AbortWithError(http.StatusInternalServerError, err)
|
|
|
- return
|
|
|
- } else if on {
|
|
|
- zlog.Error("user is online")
|
|
|
- ctx.AbortWithError(http.StatusBadRequest, eris.New("user is online"))
|
|
|
- return
|
|
|
- }
|
|
|
+ // if on, err := srv.Repositories.OnlineRepository.Is(ctx, id); err != nil {
|
|
|
+ // zlog.Error(err)
|
|
|
+ // ctx.AbortWithError(http.StatusInternalServerError, err)
|
|
|
+ // return
|
|
|
+ // } else if on {
|
|
|
+ // zlog.Error("user is online")
|
|
|
+ // ctx.AbortWithError(http.StatusBadRequest, eris.New("user is online"))
|
|
|
+ // return
|
|
|
+ // }
|
|
|
|
|
|
conn, err := srv.Upgrader.Upgrade(ctx.Writer, ctx.Request, nil)
|
|
|
if err != nil {
|