local echo: Fix type errors for message_send_error.

The function message_send_error was messing up
on calls to message.get when we were passing in
string versions of `local_id`.  Now we pass in
float ids.

This fixes a traceback where we tried to set
`.failed_request` on to an `undefined` value
that we had instead expected to be a locally
echoed message from our message store.
This commit is contained in:
Steve Howell
2020-04-09 15:43:30 +00:00
committed by Tim Abbott
parent f4f403decb
commit 9fa4ec56bb
3 changed files with 6 additions and 6 deletions

View File

@@ -29,7 +29,7 @@ function resend_message(message, row) {
}
function on_error(response) {
exports.message_send_error(local_id, response);
exports.message_send_error(message.id, response);
setTimeout(function () {
retry_spinner.toggleClass('rotating', false);
}, 300);
@@ -333,10 +333,10 @@ exports._patch_waiting_for_ack = function (data) {
waiting_for_ack = data;
};
exports.message_send_error = function (local_id, error_response) {
exports.message_send_error = function (message_id, error_response) {
// Error sending message, show inline
message_store.get(local_id).failed_request = true;
ui.show_message_failed(local_id, error_response);
message_store.get(message_id).failed_request = true;
ui.show_message_failed(message_id, error_response);
};
function abort_message(message) {