add target blank to mention links

This commit is contained in:
Gordon Pedersen 2024-05-23 11:01:57 +10:00
parent bcf2b9a5f1
commit c0a771958c

View file

@ -123,7 +123,7 @@ async function handleLol(body, env) {
|| webfinger.links?.find(l => l.rel == "me" || l.rel == "self")?.href
|| webfinger.aliases && webfinger.aliases.length > 0 ? webfinger.aliases[0] : undefined
if(link) content = content.replaceAll(mention, `[${mention}](${link}){.mention}`)
if(link) content = content.replaceAll(mention, `[${mention}](${link}){.mention target="_blank"}`)
}
}
catch(err) { console.error(err) }