From 372c635714f6e7de8a0da135980697b49f207f2c Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 4 Oct 2024 09:29:21 -0700 Subject: wip socket communication --- lib/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/utils.ts') 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); -- cgit v1.2.3