hex regex typo fix

This commit is contained in:
Siddharth Singh
2024-08-06 00:26:04 +05:30
parent 6691908fc4
commit 4f8ebb95f3
2 changed files with 6 additions and 6 deletions

View File

@@ -39,7 +39,7 @@ async function buildTemplateOpts(params: PathParams, url: string): Promise<OpenG
};
try {
if (params.acct && !params.statusId) {
const key = /[a-z0-9]/.test(params.acct) ? 'pubkey' : 'handle';
const key = /[a-f0-9]/.test(params.acct) ? 'pubkey' : 'handle';
const profile = await fetchProfile({ [key]: params.acct });
const handle = await getHandle(params.acct, profile);
res.type = 'profile';