diff --git a/DysonNetwork.Pusher/Notification/PushService.cs b/DysonNetwork.Pusher/Notification/PushService.cs index 5f39e2e..f62b0c9 100644 --- a/DysonNetwork.Pusher/Notification/PushService.cs +++ b/DysonNetwork.Pusher/Notification/PushService.cs @@ -152,7 +152,7 @@ public class PushService notification.Id, notification.Meta ); - + _ws.SendPacketToAccount(notification.AccountId.ToString(), new Connection.WebSocketPacket { Type = "notifications.new", @@ -183,8 +183,8 @@ public class PushService { var now = SystemClock.Instance.GetCurrentInstant(); await _db.Notifications - .Where(n => n.AccountId == accountId) - .ExecuteUpdateAsync(s => s.SetProperty(n => n.ViewedAt, now)); + .Where(n => n.AccountId == accountId) + .ExecuteUpdateAsync(s => s.SetProperty(n => n.ViewedAt, now)); } public async Task SendNotificationBatch(Notification notification, List accounts, bool save = false) @@ -211,7 +211,7 @@ public class PushService notification.Id, notification.Meta ); - + foreach (var account in accounts) { notification.AccountId = account; @@ -259,7 +259,8 @@ public class PushService { body = string.Join("\n", notification.Subtitle ?? string.Empty, - notification.Content ?? string.Empty).Trim(); + notification.Content ?? string.Empty + ).Trim(); } var fcmResult = await _fcm.SendAsync(new Dictionary @@ -272,12 +273,12 @@ public class PushService ["title"] = notification.Title ?? string.Empty, ["body"] = body }, - ["data"] = new Dictionary - { - ["id"] = notification.Id, - ["topic"] = notification.Topic, - ["meta"] = notification.Meta - } + // ["data"] = new Dictionary + // { + // ["Id"] = notification.Id, + // ["Topic"] = notification.Topic, + // ["Meta"] = notification.Meta + // } } }); @@ -336,4 +337,4 @@ public class PushService _logger.LogInformation( $"Successfully pushed notification #{notification.Id} to device {subscription.DeviceId} provider {subscription.Provider}"); } -} +} \ No newline at end of file diff --git a/DysonNetwork.sln.DotSettings.user b/DysonNetwork.sln.DotSettings.user index 9f3cf87..e70f165 100644 --- a/DysonNetwork.sln.DotSettings.user +++ b/DysonNetwork.sln.DotSettings.user @@ -54,6 +54,7 @@ ForceIncluded ForceIncluded ForceIncluded + ForceIncluded ForceIncluded ForceIncluded ForceIncluded