mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user