GODT-1770: handle UserBadEvent in CLI and gRPC.

This commit is contained in:
Xavier Michelon
2023-01-23 14:53:44 +01:00
parent f019ba3713
commit 5a70a16149
23 changed files with 1591 additions and 572 deletions

View File

@ -313,11 +313,14 @@ func (s *Service) watchEvents() {
// This is the event the GUI cares about.
_ = s.SendEvent(NewUserChangedEvent(event.UserID))
// The GUI doesn't care about this event... not sure why we still emit it.
// The GUI doesn't care about this event... not sure why we still emit it. GODT-2128.
if user, err := s.bridge.GetUserInfo(event.UserID); err == nil {
_ = s.SendEvent(NewUserDisconnectedEvent(user.Username))
}
case events.UserBadEvent:
_ = s.SendEvent(NewUserBadEvent(event.UserID, event.Error.Error()))
case events.UpdateLatest:
safe.RLock(func() {
s.latest = event.Version