if locked, notify admin about that on join
This commit is contained in:
parent
a0fffd3e5c
commit
1e186e8239
@ -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
|
||||||
|
Reference in New Issue
Block a user