π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Revert "Fix inactive stage lookup ordering"
Neeraj Guptac4eeaecce719
diff --git a/server/pkg/controller/user/inactive_user_orchestrator.go b/server/pkg/controller/user/inactive_user_orchestrator.goindex eb6311a336..e1a9df73fc 100644--- a/server/pkg/controller/user/inactive_user_orchestrator.go+++ b/server/pkg/controller/user/inactive_user_orchestrator.go@@ -313,12 +313,20 @@ func (c *InactiveUserOrchestrator) processCandidateBatch(candidates []repo.UserI}func (c *InactiveUserOrchestrator) processCandidate(candidate repo.UserInactivityCandidate, now int64, emailSemaphore chan struct{}) (inactivityEmailStage, bool, bool, error) {+ stageHint, err := c.resolveNextStage(candidate.UserID, candidate.LastActivity, now)+ if err != nil {+ return inactivityEmailStageNone, false, false, err+ }+ if stageHint == inactivityEmailStageNone {+ return inactivityEmailStageNone, false, false, nil+ }+user, err := c.UserRepo.Get(candidate.UserID)if err != nil {if errors.Is(err, ente.ErrUserDeleted) {return inactivityEmailStageNone, false, false, nil}- return inactivityEmailStageNone, false, false, err+ return stageHint, false, false, err}if !isEnteDomainRolloutUser(user.Email) {@@ -327,21 +335,13 @@ func (c *InactiveUserOrchestrator) processCandidate(candidate repo.UserInactivithasActivePaidEntitlement, err := c.hasActivePaidEntitlement(user.ID)if err != nil {- return inactivityEmailStageNone, false, false, err+ return stageHint, false, false, err}if hasActivePaidEntitlement {log.WithField("user_id", user.ID).Info("Skipping inactive user processing because user has active paid entitlement")return inactivityEmailStageNone, false, false, nil}- stageHint, err := c.resolveNextStage(candidate.UserID, candidate.LastActivity, now)- if err != nil {- return inactivityEmailStageNone, false, false, err- }- if stageHint == inactivityEmailStageNone {- return inactivityEmailStageNone, false, false, nil- }-lastActivity, found, err := c.UserRepo.GetLatestActivity(user.ID)if err != nil {return stageHint, false, false, err