aboutsummaryrefslogtreecommitdiffstats
path: root/lib/utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'lib/utils.ts')
-rw-r--r--lib/utils.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/utils.ts b/lib/utils.ts
index e79f459f..a805f343 100644
--- a/lib/utils.ts
+++ b/lib/utils.ts
@@ -71,7 +71,7 @@ export let fields = [
export let getUser = async (username) => {
if (username === "undefined") fail("invalid user");
let user = await migrate(username);
- if (user && !user.nwc) {
+ if (user && !user.anon && !user.nwc) {
user.nwc = bytesToHex(randomBytes(32));
await s(getPublicKey(user.nwc), user.id);
await s(`user:${user.id}`, user);