From 837c7376b3d46bceb5fa46ca982693f6e87788dd Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 7 Nov 2024 18:33:02 +0000 Subject: strip spaces from usernames before publishing --- lib/notifications.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/notifications.ts b/lib/notifications.ts index 08d96507..8891d875 100644 --- a/lib/notifications.ts +++ b/lib/notifications.ts @@ -17,8 +17,9 @@ if (config.vapid) { export const notify = async (p, user, withdrawal) => { emit(user.id, "payment", p); - const { username } = user; + let { username } = user; const { paymentReceived } = t(user); + username = username.replace(/\s/g, ""); try { if (user.verified && user.notify) { -- cgit v1.2.3