[MM-16562] Migrate User.GetUnreadCountForChannel to Sync by default (#11604)
* Migrate User.GetUnreadCountForChannel to Sync by default * Remove else block from GetUnreadCountChannel in user_store.go * Return nil value for count when an error occurs in GetUnreadCountForChannel * Fix linting issue in user_store.go
Этот коммит содержится в:
коммит произвёл
Maria A Nunez
родитель
5690df9d95
Коммит
e8f77daa8a
@@ -1842,8 +1842,7 @@ func (a *App) MarkChannelsAsViewed(channelIds []string, userId string, currentSe
|
||||
}
|
||||
}
|
||||
} else if notify == model.USER_NOTIFY_MENTION || channel.Type == model.CHANNEL_DIRECT {
|
||||
if result := <-a.Srv.Store.User().GetUnreadCountForChannel(userId, channelId); result.Err == nil {
|
||||
count := result.Data.(int64)
|
||||
if count, err := a.Srv.Store.User().GetUnreadCountForChannel(userId, channelId); err == nil {
|
||||
if count > 0 {
|
||||
channelsToClearPushNotifications = append(channelsToClearPushNotifications, channelId)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user