From 7d914fe065dbe31f22853db2fa3e2a1c8bc1fbd2 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sun, 10 Aug 2025 02:04:00 +0000 Subject: handle user with no pubkey --- routes/users.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/routes/users.ts b/routes/users.ts index dc007f05..36f2aab4 100644 --- a/routes/users.ts +++ b/routes/users.ts @@ -299,7 +299,7 @@ export default { user.haspin = !!user.pin; if (user.destination) user.destination = user.destination.trim(); - await s(`user:${user.pubkey}`, user.id); + if (user.pubkey) await s(`user:${user.pubkey}`, user.id); await s( `user:${user.username.toLowerCase().replace(/\s/g, "")}`, user.id, @@ -311,6 +311,7 @@ export default { emit(user.id, "user", user); res.send({ user }); } catch (e) { + console.log(e) warn("failed to update", user.username, e.message); bail(res, e.message); } -- cgit v1.2.3