markdown: Move code related to @mentions to markdown.js.

For consistency, we should keep all the code that works with
@mentions in markdown.js. In this case, message_list_view was
rewriting the contents of the mentions in cases where users'
names had been changed since we rendered their mention.
This commit is contained in:
Rohitt Vashishtha
2019-02-15 22:24:26 +00:00
committed by Tim Abbott
parent 44ec83ef28
commit 92658d2ac9
3 changed files with 19 additions and 5 deletions

View File

@@ -525,11 +525,7 @@ MessageListView.prototype = {
if (person !== undefined) {
// Note that person might be undefined in some
// unpleasant corner cases involving data import.
if ($(this).hasClass('silent')) {
$(this).text(person.full_name);
} else {
$(this).text("@" + person.full_name);
}
markdown.set_name_in_mention_element(this, person.full_name);
}
}
});