Match more stuff with the `to` field

environments/review-main-yi2y9f/deployments/4692
Alex Gleason 3 months ago
parent c25c07a817
commit 93bda92eaa
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7

@ -339,7 +339,7 @@ const submitCompose = (composeId: string, opts: SubmitComposeOpts = {}) =>
return;
}
const mentions: string[] | null = status.match(/(?:^|\s)@(?:([\w.+-]+)@)?([\w_-]+(\.[\w_-]+)+)/gi);
const mentions: string[] | null = status.match(/(?:^|\s)@([^@\s]+(?:@[^@\s]+)?)/gi);
if (mentions) {
to = to.union(mentions.map(mention => mention.trim().slice(1)));

Loading…
Cancel
Save