private async Task PushCipherAsync(Cipher cipher, PushType type)
{
var message = new SyncCipherPushNotification
{
Type = type,
Id = cipher.Id,
UserId = cipher.UserId,
RevisionDate = cipher.RevisionDate,
Aps = new PushNotification.AppleData { ContentAvailable = 1 }
};
var excludedTokens = new List<string>();
if(!string.IsNullOrWhiteSpace(_currentContext.DeviceIdentifier))
{
excludedTokens.Add(_currentContext.DeviceIdentifier);
}
await PushToAllUserDevicesAsync(cipher.UserId, JObject.FromObject(message), excludedTokens);
}