Fix mentioning bug

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2023-11-23 00:04:13 +01:00
parent c5e4bd9f93
commit 7ca39764f1

View file

@ -355,7 +355,7 @@ const submitCompose = (composeId: string, opts: SubmitComposeOpts = {}) =>
const mentions: string[] | null = status.match(/(?:^|\s)@([a-z\d_-]+(?:@[^@\s]+)?)/gi);
if (mentions) {
to = to.union(mentions.map(mention => mention.trim().slice(1)));
to = to.union(mentions.map(mention => mention.replace(/&#x20;/g, '').trim().slice(1)));
}
dispatch(submitComposeRequest(composeId));