e2e encryption : Should stop sending encrypted messages when user is now offline AND renew the key when he come back
Bug description
(The problem is probably already known, I'm sorry if there's already a ticket for that)
If I send a message to a user X after he disconnects himself, the message is still encrypted using the key we used while he was still online. If he is coming back, he receives a popup message saying the message could have been manipulated.
Another similar event occurs if I send the message before the new negotiation happens.
Why not stopping the e2e when receiving a disconnected presence event? Could it be a solution?
Steps to reproduce
User A and user B chat using e2e encryption. User B close and reopen Gajim while User A is still talking too much (= a message has been sent when user B was offline or because a new session is established)
Tested between Gajim 0.14.4 and Gajim hg (as of today).