diff --git a/src/controllers/well-known/nostr.ts b/src/controllers/well-known/nostr.ts index b1b84336..ae248954 100644 --- a/src/controllers/well-known/nostr.ts +++ b/src/controllers/well-known/nostr.ts @@ -4,7 +4,7 @@ import { z } from '@/deps.ts'; import type { AppController } from '@/app.ts'; import { Conf } from '../../config.ts'; -const nameSchema = z.string().min(1).regex(/^[\w_]+$/); +const nameSchema = z.string().min(1).regex(/^\w+$/); /** * Serves NIP-05's nostr.json. diff --git a/src/db.ts b/src/db.ts index bff1190f..5f13af7b 100644 --- a/src/db.ts +++ b/src/db.ts @@ -4,7 +4,7 @@ const kv = await Deno.openKv(); const userSchema = z.object({ pubkey: z.string().regex(/^[0-9a-f]{64}$/).describe('primary'), - username: z.string().regex(/^[\w_]{1,30}$/).describe('unique'), + username: z.string().regex(/^\w{1,30}$/).describe('unique'), createdAt: z.date(), });