Merge branch 'implicit-mentions-fix' into 'develop'

Mentions regex should be case-insensitive

See merge request soapbox-pub/soapbox-fe!997
profile-avatar-switcher
marcin mikołajczak 2022-01-17 19:41:29 +00:00
commit 5c862645eb
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -212,7 +212,7 @@ export function submitCompose(routerHistory, force = false) {
}
if (to && status) {
const mentions = status.match(/(?:^|\s|\.)@([a-z0-9_]+(?:@[a-z0-9\.\-]+)?)/g); // not a perfect regex
const mentions = status.match(/(?:^|\s|\.)@([a-z0-9_]+(?:@[a-z0-9\.\-]+)?)/gi); // not a perfect regex
if (mentions)
to = to.union(mentions.map(mention => mention.trim().slice(1)));