From 8b8a801da8f51e783d9071b3ec32a97569fc2713 Mon Sep 17 00:00:00 2001 From: Siddharth Singh Date: Sun, 4 Aug 2024 12:21:31 +0530 Subject: [PATCH] handle underscores in nip05 correctly --- src/middleware/serveStaticWithOG.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/middleware/serveStaticWithOG.ts b/src/middleware/serveStaticWithOG.ts index 8f679a90..0d22186b 100644 --- a/src/middleware/serveStaticWithOG.ts +++ b/src/middleware/serveStaticWithOG.ts @@ -68,7 +68,7 @@ const buildMetaTags = async (params: PathParams, url: string): Promise = const kind0 = await getProfileInfo(params.acct); const { description, image } = await getStatusInfo(params.statusId || ''); - const handle = kind0.nip05 || kind0.name || 'npub1xxx'; + const handle = kind0.nip05?.replace(/^@_/, '') || kind0.name || 'npub1xxx'; if (params.acct && params.statusId) { return tpl({