handle underscores in nip05 correctly

This commit is contained in:
Siddharth Singh 2024-08-04 12:21:31 +05:30
parent b95e31cd5d
commit 8b8a801da8
No known key found for this signature in database

View file

@ -68,7 +68,7 @@ const buildMetaTags = async (params: PathParams, url: string): Promise<string> =
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({