fix(ntfy): remove undefined fields from ntfy payload (#2931)

This commit is contained in:
Gauthier
2026-04-24 09:51:42 +02:00
committed by GitHub
parent 2d4cd0362e
commit 377bf65628

View File

@@ -95,15 +95,21 @@ class NtfyAgent
click = `${applicationUrl}/${payload.media.mediaType}/${payload.media.tmdbId}`;
}
return {
const ntfyPayload: Record<string, unknown> = {
topic,
priority,
title,
message,
markdown: true,
attach,
click,
};
if (attach) {
ntfyPayload.attach = attach;
}
if (click) {
ntfyPayload.click = click;
}
return ntfyPayload;
}
public shouldSend(): boolean {