Archived
2
0

if locked, notify admin about that on join

This commit is contained in:
m1k1o 2021-01-18 13:07:25 +01:00
parent a0fffd3e5c
commit 1e186e8239

View File

@ -22,6 +22,17 @@ func (h *MessageHandler) SessionCreated(id string, session types.Session) error
if err := h.boradcastStatus(session); err != nil { if err := h.boradcastStatus(session); err != nil {
return err 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 return nil