feat(GODT-2144): Handle IMAP/SMTP server errors via event stream

This commit is contained in:
James Houlahan
2023-02-01 13:38:16 +01:00
parent 2e832520e6
commit a74d1ce9ca
3 changed files with 13 additions and 16 deletions

View File

@ -256,12 +256,6 @@ func (s *Service) watchEvents() {
case errors.Is(err, bridge.ErrVaultInsecure):
_ = s.SendEvent(NewKeychainHasNoKeychainEvent())
case errors.Is(err, bridge.ErrServeIMAP):
_ = s.SendEvent(NewMailServerSettingsErrorEvent(MailServerSettingsErrorType_IMAP_PORT_STARTUP_ERROR))
case errors.Is(err, bridge.ErrServeSMTP):
_ = s.SendEvent(NewMailServerSettingsErrorEvent(MailServerSettingsErrorType_SMTP_PORT_STARTUP_ERROR))
}
}
@ -273,6 +267,12 @@ func (s *Service) watchEvents() {
case events.ConnStatusDown:
_ = s.SendEvent(NewInternetStatusEvent(false))
case events.IMAPServerError:
_ = s.SendEvent(NewMailServerSettingsErrorEvent(MailServerSettingsErrorType_IMAP_PORT_STARTUP_ERROR))
case events.SMTPServerError:
_ = s.SendEvent(NewMailServerSettingsErrorEvent(MailServerSettingsErrorType_SMTP_PORT_STARTUP_ERROR))
case events.Raise:
_ = s.SendEvent(NewShowMainWindowEvent())