diff --git a/src/main/services/notifications/xml.ts b/src/main/services/notifications/xml.ts index 4e8bb826..4c7b36e2 100644 --- a/src/main/services/notifications/xml.ts +++ b/src/main/services/notifications/xml.ts @@ -5,12 +5,12 @@ export interface NotificationOptions { duration?: "short" | "long"; silent?: boolean; progress?: { - title?: string; status?: string; value: number; valueOverride: string; }; } + function escape(string: string) { return string.replace(/[<>&'"]/g, (match) => { switch (match) { @@ -30,35 +30,17 @@ function escape(string: string) { }); } -function addAttributeOrTrim(name, value) { +function addAttributeOrTrim(name: string, value: string) { return value ? `${name}="${value}" ` : ""; } -const Activation = { - types: [ - "protocol", - "background", - "foreground", - "system", //system call such as alarm (snooze/dismiss), also used by Notification Visualizer - ], - behavior: ["default", "pendingUpdate"], -}; - -const Scenarios = [ - "default", - "alarm", - "reminder", - "incomingCall", - "urgent", //win10/11 22h2 -]; - export function toXmlString(options: NotificationOptions) { let template = ""; //Visual @@ -75,7 +57,6 @@ export function toXmlString(options: NotificationOptions) { "