echo: Update topic_links when we get messages back from server. (#12832)

This commit is contained in:
Rohitt Vashishtha 2019-07-20 21:38:52 +00:00 committed by Tim Abbott
parent 9b69c1f7fe
commit 9d6727d18c
2 changed files with 5 additions and 0 deletions

View File

@ -1,4 +1,5 @@
zrequire('echo');
zrequire('util');
let disparities = [];
let messages_to_rerender = [];
@ -52,6 +53,7 @@ run_test('process_from_server for differently rendered messages', () => {
timestamp: old_value,
is_me_message: old_value,
submessages: old_value,
subject_links: old_value,
},
};
const server_messages = [
@ -61,6 +63,7 @@ run_test('process_from_server for differently rendered messages', () => {
timestamp: new_value,
is_me_message: new_value,
submessages: new_value,
subject_links: new_value,
},
];
echo._patch_waiting_for_awk(waiting_for_ack);
@ -74,5 +77,6 @@ run_test('process_from_server for differently rendered messages', () => {
timestamp: new_value,
is_me_message: new_value,
submessages: new_value,
subject_links: new_value,
}]);
});

View File

@ -228,6 +228,7 @@ exports.process_from_server = function process_from_server(messages) {
// the backend.
client_message.timestamp = message.timestamp;
util.set_topic_links(client_message, util.get_topic_links(message));
client_message.is_me_message = message.is_me_message;
client_message.submessages = message.submessages;