Badge count fix for push notifications when CRT is enabled (#20898)

* Fix

* Fixed other cases and tests

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Anurag Shivarathri
2022-09-12 14:51:33 +05:30
коммит произвёл GitHub
родитель 8edd351f27
Коммит 203c6a5013
11 изменённых файлов: 85 добавлений и 51 удалений

Просмотреть файл

@@ -9983,10 +9983,10 @@ func (s *TimerLayerUserStore) GetTeamGroupUsers(teamID string) ([]*model.User, e
return result, err
}
func (s *TimerLayerUserStore) GetUnreadCount(userID string) (int64, error) {
func (s *TimerLayerUserStore) GetUnreadCount(userID string, isCRTEnabled bool) (int64, error) {
start := time.Now()
result, err := s.UserStore.GetUnreadCount(userID)
result, err := s.UserStore.GetUnreadCount(userID, isCRTEnabled)
elapsed := float64(time.Since(start)) / float64(time.Second)
if s.Root.Metrics != nil {