signal-cli icon indicating copy to clipboard operation
signal-cli copied to clipboard

Allow for pending messages if there's no network connection

Open Android-X13 opened this issue 3 years ago • 5 comments

Would that be possible?

Like in the Signal app for example: when you send a message while not having an Internet connection, the message is pending until a network connection has been established and then it is sent normally.

Obviously to implement this kind of mechanism signal-cli would need to temporarily store somehow/somewhere the pending message(s).

Currently if there's no connection and I try to send a message I get an exit code of 3 and the following error message:

Error while checking account +XXXXXXXXXXXX: java.net.UnknownHostException: chat.signal.org: Temporary failure in name resolution

Android-X13 avatar Apr 18 '22 16:04 Android-X13

I would like this too!

Tsjippy avatar Apr 30 '22 05:04 Tsjippy

Would be possible, but would need larger changes. It's also not clear what the behavior should be if signal-cli is not running in daemon mode ...

  • Temporarily store messages
  • Requires new notification mechanism for notifying asynchronously when a message actually got sent.

AsamK avatar May 16 '22 13:05 AsamK

Would it be possible to at least reconnect when attempting to send a new message/request? Currently if signal-cli is started while no internet connection is available, the daemon is essentially "bricked" until restarted with internet on: every invocation results in Specified account does not exist even if internet did come back at the time of sending.

orazioedoardo avatar Apr 07 '23 09:04 orazioedoardo

Would be possible. That would need some retry method in signal-cli to recheck accounts that failed to load due to a missing internet connection. At startup signal-cli needs to check if the account is still active on the server.

AsamK avatar Aug 10 '23 16:08 AsamK

I just ended up modifying the sytemd unit to prepend an ExecStartPre script to wait for internet connection before starting signal-cli.

orazioedoardo avatar Aug 10 '23 17:08 orazioedoardo