Skip to content

Commit

Permalink
fix(updates): don't set qts if it's 0
Browse files Browse the repository at this point in the history
  • Loading branch information
snimshchikov committed Apr 16, 2023
1 parent c69e7a9 commit 470c959
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions telegram/updates/state_apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,11 @@ func (s *internalState) applyQts(ctx context.Context, state int, updates []updat
s.log.Error("Handle updates error", zap.Error(err))
}

// Don't set qts if it's 0, because it means that we are apllying gaps updates
if state == 0 {
return nil
}

if err := s.storage.SetQts(ctx, s.selfID, state); err != nil {
s.log.Error("SetQts error", zap.Error(err))
}
Expand Down

0 comments on commit 470c959

Please sign in to comment.