🐛 Fix failed to push when no push subscription
This commit is contained in:
parent
9a96cf68bb
commit
fb2f138925
@ -248,9 +248,12 @@ public class NotificationService(
|
||||
private async Task _PushNotification(Notification notification,
|
||||
IEnumerable<NotificationPushSubscription> subscriptions)
|
||||
{
|
||||
var subList = subscriptions.ToList();
|
||||
if (subList.Count == 0) return;
|
||||
|
||||
var requestDict = new Dictionary<string, object>
|
||||
{
|
||||
["notifications"] = _BuildNotificationPayload(notification, subscriptions)
|
||||
["notifications"] = _BuildNotificationPayload(notification, subList)
|
||||
};
|
||||
|
||||
var client = httpFactory.CreateClient();
|
||||
|
Loading…
x
Reference in New Issue
Block a user