Merge branch 'fix-mention' into 'main'

fix: mention with hyphen

See merge request soapbox-pub/ditto!619
This commit is contained in:
Alex Gleason 2025-01-21 16:16:28 +00:00
commit 1204dc722f

View file

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