Skip to content

Commit

Permalink
fix: @ in message resets the format - EXO-69693. (#713)
Browse files Browse the repository at this point in the history
Before this change, when type a message having multiple line and add @ anywhere in message and send message. After this change, this message is sent and displayed correctly.

(cherry picked from commit 2030702)
  • Loading branch information
akhanfir authored and Jihed525 committed Feb 19, 2024
1 parent 2e2d045 commit b95b1e9
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,15 @@ export default {
sendMessage() {
let newMessage = this.$refs.messageComposerArea.innerHTML;
if (newMessage.indexOf('@') > -1) {
newMessage = this.checkMention(newMessage);
const tab = newMessage.split('<br>');
newMessage = '';
for (const elm of tab) {
let element = elm;
if (element.indexOf('@') > -1) {
element = this.checkMention(element);
}
newMessage = newMessage.concat(element).concat('<br>');
}
}
if (!newMessage || !newMessage.trim()) {
return;
Expand Down

0 comments on commit b95b1e9

Please sign in to comment.