mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
acct can be a bare pubkey
This commit is contained in:
parent
f6bd7fc3a5
commit
aa0727a96d
1 changed files with 2 additions and 1 deletions
|
|
@ -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`;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue