From 9736646b034ed40a377fd9d70339765c99ffa5fe Mon Sep 17 00:00:00 2001 From: Martin Berka Date: Mon, 16 Oct 2023 09:10:51 +0200 Subject: [PATCH] =?UTF-8?q?K=C3=B3dov=C3=A1n=C3=AD=20username=20pro=20ntfy?= =?UTF-8?q?=20v=20base64?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/notifikace.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/src/notifikace.ts b/server/src/notifikace.ts index 2c24f63..e7006b2 100644 --- a/server/src/notifikace.ts +++ b/server/src/notifikace.ts @@ -99,6 +99,9 @@ export const ntfyCall = async (data: NotififaceInput) => { export const callNotifikace = async ({ input, teams = true, gotify = false, ntfy = true }: NotifikaceData) => { const notifications = []; if (ntfy) { + if (input.user) { + input.user = Buffer.from(input.user, 'utf8').toString('base64'); + } const ntfyPromises = await ntfyCall(input); if (ntfyPromises) { notifications.push(...ntfyPromises);