Update.
This commit is contained in:
parent
586c653e4f
commit
0c6da9845c
@ -217,8 +217,10 @@ class ChatInputComponent extends NjetComponent {
|
|||||||
const matches = this.matchMentionsToAuthors(mentions, authors);
|
const matches = this.matchMentionsToAuthors(mentions, authors);
|
||||||
let updatedText = text;
|
let updatedText = text;
|
||||||
matches.forEach(({ mention, closestAuthor }) => {
|
matches.forEach(({ mention, closestAuthor }) => {
|
||||||
const mentionRegex = new RegExp(`@${mention}`, 'g');
|
if(closestAuthor){
|
||||||
updatedText = updatedText.replace(mentionRegex, `@${closestAuthor}`);
|
const mentionRegex = new RegExp(`@${mention}`, 'g');
|
||||||
|
updatedText = updatedText.replace(mentionRegex, `@${closestAuthor}`);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return updatedText;
|
return updatedText;
|
||||||
|
Loading…
Reference in New Issue
Block a user