feat(notifications): add user-configurable ntfy to
This commit is contained in:
1 parent
2ac2789728
commit
7a89a97bf3
15 files changed
+2310
-22
No files matched your search
+1
@@ -10,6 +10,7 @@ public record UpdateNotificationConfigCommand(
|
||||
string? EmailAddress,
|
||||
bool? NtfyEnabled,
|
||||
string? NtfyUrl,
|
||||
string? NtfyTopic,
|
||||
string? Language,
|
||||
bool? DailyDigest,
|
||||
bool? WeeklyDigest,
|
||||
|
||||
+2
-2
@@ -32,8 +32,8 @@ public class UpdateNotificationConfigHandler : IRequestHandler<UpdateNotificatio
|
||||
if (request.EmailEnabled.HasValue || request.EmailAddress is not null)
|
||||
config.UpdateEmail(request.EmailAddress ?? config.EmailAddress, request.EmailEnabled ?? config.EmailEnabled);
|
||||
|
||||
if (request.NtfyEnabled.HasValue || request.NtfyUrl is not null)
|
||||
config.UpdateNtfy(request.NtfyUrl ?? config.NtfyUrl, request.NtfyEnabled ?? config.NtfyEnabled);
|
||||
if (request.NtfyEnabled.HasValue || request.NtfyUrl is not null || request.NtfyTopic is not null)
|
||||
config.UpdateNtfy(request.NtfyUrl ?? config.NtfyUrl, request.NtfyEnabled ?? config.NtfyEnabled, request.NtfyTopic);
|
||||
|
||||
if (request.DailyDigest.HasValue || request.WeeklyDigest.HasValue)
|
||||
config.UpdateDigests(request.DailyDigest ?? config.DailyDigest, request.WeeklyDigest ?? config.WeeklyDigest);
|
||||
|
||||
+1
@@ -33,6 +33,7 @@ public class GetNotificationConfigHandler : IRequestHandler<GetNotificationConfi
|
||||
null, // EmailAddress
|
||||
false, // NtfyEnabled
|
||||
null, // NtfyUrl
|
||||
null, // NtfyTopic
|
||||
"fr", // Language
|
||||
false, // DailyDigest
|
||||
false, // WeeklyDigest
|
||||
|
||||
Reference in new issue
Block a user