mirror of
https://github.com/liamcottle/reticulum-meshchat.git
synced 2026-10-26 19:01:43 -04:00
Stop message progress loop when message is rejected
The progress loop in handle_lxmf_message_progress upserts the message to the database every second until it reaches a terminal state, but REJECTED was missing from the stop conditions. A rejected message kept re-inserting itself forever, so deleting the conversation history had no effect and the message reappeared on page reload.
This commit is contained in:
parent
45f89a8fca
commit
7e88277abd
1 changed files with 2 additions and 1 deletions
|
|
@ -3031,10 +3031,11 @@ class ReticulumMeshChat:
|
|||
has_delivered = lxmf_message.state == LXMF.LXMessage.DELIVERED
|
||||
has_propagated = lxmf_message.state == LXMF.LXMessage.SENT and lxmf_message.method == LXMF.LXMessage.PROPAGATED
|
||||
has_failed = lxmf_message.state == LXMF.LXMessage.FAILED
|
||||
has_rejected = lxmf_message.state == LXMF.LXMessage.REJECTED
|
||||
is_cancelled = lxmf_message.state == LXMF.LXMessage.CANCELLED
|
||||
|
||||
# check if we should stop updating
|
||||
if has_delivered or has_propagated or has_failed or is_cancelled:
|
||||
if has_delivered or has_propagated or has_failed or has_rejected or is_cancelled:
|
||||
should_update_message = False
|
||||
|
||||
# handle an announce received from reticulum, for an audio call address
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue