mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
message_edit: Fix red highlighting for messages mentioning you.
When we added support for mentioning users when editing messages, we neglected to add this bit of code needed to make sure the UI code in message_list_view.js would actually rerender that part of the message's state. Arguably, this is a sign that the message_container structure should be just recomputed every time we rerender messages, but that's a less tactical fix.
This commit is contained in:
@@ -125,6 +125,7 @@ exports.update_messages = function update_messages(events) {
|
||||
}
|
||||
msgs_to_rerender.push(msg);
|
||||
|
||||
msg.flags = event.flags;
|
||||
message_store.set_message_booleans(msg, event.flags);
|
||||
|
||||
condense.un_cache_message_content_height(msg.id);
|
||||
|
||||
@@ -866,6 +866,9 @@ MessageListView.prototype = {
|
||||
this._add_msg_timestring(message_container);
|
||||
this._maybe_format_me_message(message_container);
|
||||
|
||||
// Make sure the right thing happens if the message was edited to mention us.
|
||||
message_container.contains_mention = message_container.msg.mentioned;
|
||||
|
||||
var rendered_msg = $(this._get_message_template(message_container));
|
||||
if (message_content_edited) {
|
||||
rendered_msg.addClass("fade-in-message");
|
||||
|
||||
Reference in New Issue
Block a user