signal-cli
signal-cli copied to clipboard
Allow for pending messages if there's no network connection
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
I would like this too!
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.
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.
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.
I just ended up modifying the sytemd unit to prepend an ExecStartPre script to wait for internet connection before starting signal-cli.