MM-15796 Migrate "Session.GetSessionsWithActiveDeviceIds" to Sync by default (#10954)

* MM-15796 Migrate "Session.GetSessionsWithActiveDeviceIds" to Sync by default

* Change API Call to use Sync approach
Этот коммит содержится в:
Bolarinwa Balogun
2019-05-28 09:55:04 -04:00
коммит произвёл Jesús Espino
родитель d9969613f7
Коммит bdcee4d979
5 изменённых файлов: 35 добавлений и 23 удалений

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

@@ -404,11 +404,7 @@ func (a *App) SendAckToPushProxy(ack *model.PushNotificationAck) error {
}
func (a *App) getMobileAppSessions(userId string) ([]*model.Session, *model.AppError) {
result := <-a.Srv.Store.Session().GetSessionsWithActiveDeviceIds(userId)
if result.Err != nil {
return nil, result.Err
}
return result.Data.([]*model.Session), nil
return a.Srv.Store.Session().GetSessionsWithActiveDeviceIds(userId)
}
func ShouldSendPushNotification(user *model.User, channelNotifyProps model.StringMap, wasMentioned bool, status *model.Status, post *model.Post) bool {