diff --git a/DysonNetwork.Sphere/Account/NotificationService.cs b/DysonNetwork.Sphere/Account/NotificationService.cs index e21bd07..1599408 100644 --- a/DysonNetwork.Sphere/Account/NotificationService.cs +++ b/DysonNetwork.Sphere/Account/NotificationService.cs @@ -240,18 +240,20 @@ public class NotificationService if (_apns == null) throw new InvalidOperationException("The apple notification push service is not initialized."); - await _apns.SendAsync(new + await _apns.SendAsync(new Dictionary { - aps = new + ["aps"] = new Dictionary { - alert = new + ["alert"] = new Dictionary { - title = notification.Title ?? string.Empty, - subtitle = notification.Subtitle ?? string.Empty, - body = notification.Content ?? string.Empty + ["title"] = notification.Title ?? string.Empty, + ["subtitle"] = notification.Subtitle ?? string.Empty, + ["body"] = notification.Content ?? string.Empty } }, - meta = notification.Meta ?? new Dictionary() + ["sound"] = (notification.Priority > 0 ? "default" : null) ?? string.Empty, + ["mutable-content"] = 1, + ["meta"] = notification.Meta ?? new Dictionary() }, deviceToken: subscription.DeviceToken, apnsId: notification.Id.ToString(),