Kódování username pro ntfy v base64

This commit is contained in:
Martin Berka 2023-10-16 09:10:51 +02:00
parent 9c2808d4ec
commit 9736646b03

View File

@ -99,6 +99,9 @@ export const ntfyCall = async (data: NotififaceInput) => {
export const callNotifikace = async ({ input, teams = true, gotify = false, ntfy = true }: NotifikaceData) => { export const callNotifikace = async ({ input, teams = true, gotify = false, ntfy = true }: NotifikaceData) => {
const notifications = []; const notifications = [];
if (ntfy) { if (ntfy) {
if (input.user) {
input.user = Buffer.from(input.user, 'utf8').toString('base64');
}
const ntfyPromises = await ntfyCall(input); const ntfyPromises = await ntfyCall(input);
if (ntfyPromises) { if (ntfyPromises) {
notifications.push(...ntfyPromises); notifications.push(...ntfyPromises);