From 9d6727d18ce061fb46548d4ecda56d0a64990216 Mon Sep 17 00:00:00 2001 From: Rohitt Vashishtha Date: Sat, 20 Jul 2019 21:38:52 +0000 Subject: [PATCH] echo: Update topic_links when we get messages back from server. (#12832) --- frontend_tests/node_tests/echo.js | 4 ++++ static/js/echo.js | 1 + 2 files changed, 5 insertions(+) diff --git a/frontend_tests/node_tests/echo.js b/frontend_tests/node_tests/echo.js index 8cc63fb05c..fde3c5821f 100644 --- a/frontend_tests/node_tests/echo.js +++ b/frontend_tests/node_tests/echo.js @@ -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, }]); }); diff --git a/static/js/echo.js b/static/js/echo.js index 269aca0cd9..ded3714fe6 100644 --- a/static/js/echo.js +++ b/static/js/echo.js @@ -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;