mirror of
https://github.com/zulip/zulip.git
synced 2025-10-31 20:13:46 +00:00
reactions: Simplify markup related to message ids.
Because of local echo, message ids can change in message rows. Having reactions use markup to indicate their message id just creates more moving parts, since we would need to handle message_id_changed events. Now our handlers just call row.get_message_id() as needed.
This commit is contained in:
@@ -330,15 +330,6 @@ exports.get_message_reactions = function (message) {
|
||||
return reactions;
|
||||
};
|
||||
|
||||
exports.initialize = function () {
|
||||
$(document).on('message_id_changed', function (event) {
|
||||
// When a message ID is changed via editing, update any
|
||||
// data-message-id references to it.
|
||||
var elts = $(".message_reactions[data-message-id='" + event.old_id + "']");
|
||||
elts.attr("data-message-id", event.new_id);
|
||||
});
|
||||
};
|
||||
|
||||
return exports;
|
||||
}());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user