migrated to sync (#11407)

This commit is contained in:
Alex Sahin
2019-06-26 16:27:30 +01:00
committed by Maria A Nunez
parent 6ff393527e
commit cb7c549c7b
4 changed files with 22 additions and 17 deletions

View File

@@ -1841,8 +1841,8 @@ func (a *App) MarkChannelsAsViewed(channelIds []string, userId string, currentSe
notify = user.NotifyProps[model.PUSH_NOTIFY_PROP]
}
if notify == model.USER_NOTIFY_ALL {
if result := <-a.Srv.Store.User().GetAnyUnreadPostCountForChannel(userId, channelId); result.Err == nil {
if result.Data.(int64) > 0 {
if count, err := a.Srv.Store.User().GetAnyUnreadPostCountForChannel(userId, channelId); err == nil {
if count > 0 {
channelsToClearPushNotifications = append(channelsToClearPushNotifications, channelId)
}
}