🐛 Fix push notification didn't contains custom category identifier
This commit is contained in:
@@ -14,7 +14,7 @@ public class Notification : ModelBase
|
||||
[MaxLength(1024)] public string? Title { get; set; }
|
||||
[MaxLength(2048)] public string? Subtitle { get; set; }
|
||||
[MaxLength(4096)] public string? Content { get; set; }
|
||||
[Column(TypeName = "jsonb")] public Dictionary<string, object>? Meta { get; set; }
|
||||
[Column(TypeName = "jsonb")] public Dictionary<string, object?> Meta { get; set; }
|
||||
public int Priority { get; set; } = 10;
|
||||
public Instant? ViewedAt { get; set; }
|
||||
|
||||
|
@@ -238,7 +238,7 @@ public class PushService
|
||||
{
|
||||
["id"] = notification.Id,
|
||||
["topic"] = notification.Topic,
|
||||
["meta"] = notification.Meta ?? new Dictionary<string, object>()
|
||||
["meta"] = notification.Meta
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -259,13 +259,14 @@ public class PushService
|
||||
var payload = new Dictionary<string, object?>
|
||||
{
|
||||
["topic"] = _apnsTopic,
|
||||
["type"] = notification.Topic,
|
||||
["aps"] = new Dictionary<string, object?>
|
||||
{
|
||||
["alert"] = alertDict,
|
||||
["sound"] = notification.Priority >= 5 ? "default" : null,
|
||||
["mutable-content"] = 1
|
||||
},
|
||||
["meta"] = notification.Meta ?? new Dictionary<string, object>()
|
||||
["meta"] = notification.Meta
|
||||
};
|
||||
|
||||
await _apns.SendAsync(
|
||||
|
Reference in New Issue
Block a user