Notification action URIs

This commit is contained in:
2025-06-14 16:57:23 +08:00
parent e7942fc687
commit c8b1c1ba55
5 changed files with 13 additions and 5 deletions

View File

@ -67,6 +67,7 @@ public class NotificationService(
string? subtitle = null,
string? content = null,
Dictionary<string, object>? meta = null,
string? actionUri = null,
bool isSilent = false,
bool save = true
)
@ -74,6 +75,9 @@ public class NotificationService(
if (title is null && subtitle is null && content is null)
throw new ArgumentException("Unable to send notification that completely empty.");
meta ??= new Dictionary<string, object>();
if (actionUri is not null) meta["action_uri"] = actionUri;
var notification = new Notification
{
Topic = topic,