Úprava uživatelských jmen pro ntfy URL

This commit is contained in:
Martin Berka 2023-10-16 09:18:08 +02:00
parent 9736646b03
commit dc959543f4

View File

@ -100,7 +100,7 @@ export const callNotifikace = async ({ input, teams = true, gotify = false, ntfy
const notifications = []; const notifications = [];
if (ntfy) { if (ntfy) {
if (input.user) { if (input.user) {
input.user = Buffer.from(input.user, 'utf8').toString('base64'); input.user = input.user.normalize('NFD').replace(' ', '').replace(/[\u0300-\u036f]/g, '').toLowerCase();
} }
const ntfyPromises = await ntfyCall(input); const ntfyPromises = await ntfyCall(input);
if (ntfyPromises) { if (ntfyPromises) {