Show 1:1 messages in pending state until sent
Currently there is no visual indication that a message failed to send because of a connectivity loss. Steps to reproduce:
- Start Gajim and connect to the server as normal.
- Simulate a connectivity loss on the server side by adding a firewall rule:
# iptables -I INPUT 1 -s <gajim ip> -p tcp --dport 5222 -j DROP
. - Send a message before Gajim notices the loss of connectivity.
Even though Gajim sends <r xmlns="urn:xmpp:sm:3" />
and never receives an answer and eventually notices the loss of the connectivity when a ping fails, there is never any indication that the message has not been submitted to the server! For instant messaging it is catastrophic if a user thinks a message has been sent, but it has, in fact, not been sent.
If stream management is supported by the server, we should be able to detect this situation and Gajim should indicate whether a message has been received by the server. This could be done by having a label "sending..." on the message until a SM ACK is received, additionally graying out the message or even not displaying the message until it has been received by the server like in MUCs (but the message just disappearing after pressing ENTER is very irritating to me). Additionally it would probably be a good idea to notify the user that some message could not be submitted to the server after a few minutes.
(Finally, the connectivity can be restored by deleting the firewall rule again with # iptables -D INPUT 1
.)