move locks and bans to state.

This commit is contained in:
Miroslav Šedivý
2022-09-13 20:04:43 +02:00
parent 06e25df962
commit e045bd8a1e
6 changed files with 88 additions and 33 deletions

View File

@ -16,7 +16,7 @@ func (h *MessageHandler) SessionCreated(id string, session types.Session) error
if err := session.Send(message.SystemInit{
Event: event.SYSTEM_INIT,
ImplicitHosting: h.webrtc.ImplicitControl(),
Locks: h.Locked,
Locks: h.state.AllLocked(),
}); err != nil {
h.logger.Warn().Str("id", id).Err(err).Msgf("sending event %s has failed", event.SYSTEM_INIT)
return err