Merge branch 'simpler-to-regex' into 'main'
Match more stuff with the `to` field Closes #1675 See merge request soapbox-pub/soapbox!3059
This commit is contained in:
commit
3ce9e1167a
|
@ -339,7 +339,7 @@ const submitCompose = (composeId: string, opts: SubmitComposeOpts = {}) =>
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const mentions: string[] | null = status.match(/(?:^|\s)@(?:([\w.+-]+)@)?([\w_-]+(\.[\w_-]+)+)/gi);
|
const mentions: string[] | null = status.match(/(?:^|\s)@([^@\s]+(?:@[^@\s]+)?)/gi);
|
||||||
|
|
||||||
if (mentions) {
|
if (mentions) {
|
||||||
to = to.union(mentions.map(mention => mention.trim().slice(1)));
|
to = to.union(mentions.map(mention => mention.trim().slice(1)));
|
||||||
|
|
Loading…
Reference in New Issue