aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-11-07 18:33:02 +0000
committerAdam Soltys <[email protected]>2024-11-07 18:33:02 +0000
commit837c7376b3d46bceb5fa46ca982693f6e87788dd (patch)
tree6632d00245e8cb174e1137443b4ca76e56d2d14f
parentd0de00fab7b474c9b691bef0cd3b2da2dd2d67c1 (diff)
downloadcoinos-server-837c7376b3d46bceb5fa46ca982693f6e87788dd.tar.gz
coinos-server-837c7376b3d46bceb5fa46ca982693f6e87788dd.zip
strip spaces from usernames before publishing
-rw-r--r--lib/notifications.ts3
1 files changed, 2 insertions, 1 deletions
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) {