1
0
mirror of https://github.com/bitwarden/server.git synced 2025-02-01 23:31:41 +01:00

only get devices with push tokens

This commit is contained in:
Kyle Spearrin 2017-11-14 08:39:16 -05:00
parent 05bdec7622
commit 7e2d0ed0c1

View File

@ -1321,7 +1321,7 @@ namespace Bit.Core.Services
private async Task<IEnumerable<string>> GetUserDeviceIdsAsync(Guid userId)
{
var devices = await _deviceRepository.GetManyByUserIdAsync(userId);
return devices.Select(d => d.Id.ToString());
return devices.Where(d => !string.IsNullOrWhiteSpace(d.PushToken)).Select(d => d.Id.ToString());
}
}
}