mirror of
https://github.com/aljazceru/ditto.git
synced 2026-01-14 11:04:18 +01:00
acct can be a bare pubkey
This commit is contained in:
@@ -39,7 +39,8 @@ async function buildTemplateOpts(params: PathParams, url: string): Promise<OpenG
|
||||
};
|
||||
try {
|
||||
if (params.acct && !params.statusId) {
|
||||
const profile = await fetchProfile({ handle: params.acct });
|
||||
const key = /[a-z0-9]/.test(params.acct) ? 'pubkey' : 'handle';
|
||||
const profile = await fetchProfile({ [key]: params.acct });
|
||||
const handle = await getHandle(params.acct, profile);
|
||||
res.type = 'profile';
|
||||
res.title = `View @${handle}'s profile on Ditto`;
|
||||
|
||||
Reference in New Issue
Block a user