aboutsummaryrefslogtreecommitdiffstats
path: root/routes/users.ts
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-10-09 12:51:00 -0700
committerAdam Soltys <[email protected]>2024-10-10 12:17:05 -0700
commitd734c424f19bbec89274d828c3a2b70dd3ef221a (patch)
tree8ec38336b345539c5ea110c2800eff79c677b19d /routes/users.ts
parentc0bfa4a8a45415e16ef335219c84632f4c04f97d (diff)
downloadcoinos-server-d734c424f19bbec89274d828c3a2b70dd3ef221a.tar.gz
coinos-server-d734c424f19bbec89274d828c3a2b70dd3ef221a.zip
follows
Diffstat (limited to 'routes/users.ts')
-rw-r--r--routes/users.ts10
1 files changed, 8 insertions, 2 deletions
diff --git a/routes/users.ts b/routes/users.ts
index f907340e..e1971e78 100644
--- a/routes/users.ts
+++ b/routes/users.ts
@@ -87,11 +87,17 @@ export default {
if (key.length === 64) {
let nostr: any = await getProfile(key);
if (nostr) {
- nostr.username = nostr.name;
+ nostr.username = nostr.name || key.substr(0, 6);
nostr.display = nostr.display_name || nostr.displayName;
+ delete nostr.display_name;
+ delete nostr.displayName;
+ delete nostr.name;
}
- if (user) user.anon = false;
+ if (user) {
+ user.anon = false;
+ delete nostr.display;
+ }
user = {
...nostr,