GODT-2042: fix setup guide not always showing on first login.

This commit is contained in:
Xavier Michelon
2022-12-02 11:17:28 +01:00
parent e87db5b2ab
commit 4003e0a2ab
20 changed files with 1039 additions and 1033 deletions

View File

@ -390,6 +390,8 @@ func (s *Service) loginClean() {
func (s *Service) finishLogin() {
defer s.loginClean()
wasSignedOut := s.bridge.HasUser(s.auth.UserID)
if len(s.password) == 0 || s.auth.UID == "" || s.authClient == nil {
s.log.
WithField("hasPass", len(s.password) != 0).
@ -415,7 +417,7 @@ func (s *Service) finishLogin() {
s.log.WithField("userID", userID).Debug("Login finished")
_ = s.SendEvent(NewLoginFinishedEvent(userID))
_ = s.SendEvent(NewLoginFinishedEvent(userID, wasSignedOut))
}
func (s *Service) waitForUserChangeDone(eventCh <-chan events.Event, userID string) {