Merge branch 'fix-mention' into 'main'

fix: mention with hyphen

See merge request soapbox-pub/ditto!619
This commit is contained in:
P. Reis 2025-01-21 16:13:32 +00:00
commit a9edc4bd26

View file

@ -151,7 +151,7 @@ const createStatusController: AppController = async (c) => {
let content = await asyncReplaceAll(
data.status ?? '',
/(?<![\w/])@([\w@+._]+)(?![\w/\.])/g,
/(?<![\w/])@([\w@+._-]+)(?![\w/\.])/g,
async (match, username) => {
const pubkey = await lookupPubkey(username);
if (!pubkey) return match;