deltachat-core-rust icon indicating copy to clipboard operation
deltachat-core-rust copied to clipboard

Ephemeral messages not sent when network failure lasts longer than ephemeral message timer

Open gerryfrancis opened this issue 4 years ago • 3 comments

  • Operating System (Linux/Mac/Windows/iOS/Android): Android 10 on Fairphone FP2 (Lineage OS 17.1 build QQ3A.200805.001 from 2021-04-16).

  • Delta Chat Version: 1.19.1.

  • Expected behavior: The ephemeral timer for sent group messages is started as soon as the message is sent to a SMTP relay.

  • Actual behavior: The ephemeral timer for sent group messages is started as soon as it is assigned to be sent. If the message cannot be sent due to a network failure that lasts longer than the time value of delay for disappearing messages is set, the message is never sent off.

  • Steps to reproduce the problem: -- Set "disappearing messages" to one minute in a group. -- Disconnect from network (e.g. by enabling airplane mode, no WiFi enabled). -- Send a message and wait at least one minute. (Result: The message disappears and is never sent off.)

  • Screenshots: N/A.

  • Logs: N/A.

gerryfrancis avatar Apr 19 '21 15:04 gerryfrancis

I have just found out that group rename system messages are ephemeral and therefore affected as well, so another Delta Chat client using the same account is never informed about a group name change.

gerryfrancis avatar Apr 19 '21 15:04 gerryfrancis

It is sort of expected according to this comment: https://github.com/deltachat/deltachat-core-rust/blob/a4486d8c300338769a1e487bca7b1c42b0eb99be/src/job.rs#L380

message::exists checks if the message exists and is not in the trash chat.

As for starting the timer when message is sent (one tick, not spinner), it's a solution indeed.

link2xt avatar Apr 22 '21 14:04 link2xt

I have just found out that group rename system messages are ephemeral and therefore affected as well, so another Delta Chat client using the same account is never informed about a group name change.

This is a separate group consistency problem. I think it's better solved by sending the name periodically, for example whenever group avatar is sent and even if the group has no avatar.

link2xt avatar Apr 22 '21 15:04 link2xt

We discussed this with @hpk42 as it is related to #4387.

Currently I would say that the solution for this issue is that the message should only be removed from SMTP queue if the message is deleted explicitly, not when it expires.

link2xt avatar Jul 25 '23 13:07 link2xt

Closing this is favor of #4579

link2xt avatar Jul 25 '23 13:07 link2xt