π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Fix inactive stage lookup ordering
Neeraj Guptad6a79d0ae24c
diff --git a/server/pkg/controller/user/inactive_user_orchestrator.go b/server/pkg/controller/user/inactive_user_orchestrator.goindex e1a9df73fc..eb6311a336 100644--- a/server/pkg/controller/user/inactive_user_orchestrator.go+++ b/server/pkg/controller/user/inactive_user_orchestrator.go@@ -313,20 +313,12 @@ 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 stageHint, false, false, err+ return inactivityEmailStageNone, false, false, err}if !isEnteDomainRolloutUser(user.Email) {@@ -335,13 +327,21 @@ func (c *InactiveUserOrchestrator) processCandidate(candidate repo.UserInactivithasActivePaidEntitlement, err := c.hasActivePaidEntitlement(user.ID)if err != nil {- return stageHint, false, false, err+ return inactivityEmailStageNone, 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