diff --git a/server/internal/websocket/session.go b/server/internal/websocket/session.go index 9151aa2..899368d 100644 --- a/server/internal/websocket/session.go +++ b/server/internal/websocket/session.go @@ -22,6 +22,17 @@ func (h *MessageHandler) SessionCreated(id string, session types.Session) error if err := h.boradcastStatus(session); err != nil { return err } + + // if locked, notify admin about that + if h.locked { + if err := session.Send(message.MembersList{ + Event: event.ADMIN_LOCK, + ID: id, + }); err != nil { + h.logger.Warn().Str("id", id).Err(err).Msgf("sending event %s has failed", event.ADMIN_LOCK) + return err + } + } } return nil