mirror of https://github.com/zulip/zulip.git
echo: Fix handling of `locally_echoed` flag after successful msg resend.
The `on_success` function within `echo.resend_message` is executed when the server successfully acknowledges a resent message. In this scenario, the `locally_echoed` flag should be set to false, as the message has been confirmed by the server. This behavior is already correctly handled within the `echo.reify_message_id()` function, which is triggered through the `compose.send_message_success()` flow. However, the on_success function incorrectly sets the `locally_echoed` flag to true, which is unnecessary and likely a mistake. This led to the bug where message controls would disappear from the resent messages on slow networks. This commit removes the erroneous line to ensure proper flag handling during message resend.
This commit is contained in:
parent
5583ddd3bf
commit
b8d4bddacf
|
@ -171,7 +171,6 @@ function resend_message(
|
|||
function on_success(raw_data: unknown): void {
|
||||
const data = send_message_api_response_schema.parse(raw_data);
|
||||
const message_id = data.id;
|
||||
message.locally_echoed = true;
|
||||
|
||||
hide_retry_spinner($row);
|
||||
|
||||
|
|
Loading…
Reference in New Issue