Remember resource between reconnections
By default Gajim uses
gajim.$rand resource, which is computed each time a connection is made (see
gajim/common/connection.py). It makes impossible to track the device between reconnections. I propose to remove templates (which support
$rand only anyways), generate resource once in the form of
gajim.$rand on account creation and keep it in the configuration file. Then user can change it manually only.
https://conversations.im/ uses similar approach, with resources like
Conversations.$rand, the random part is saved.
Having permanent resources will make it possible to deliver messages with
<no-permanent-store /> to offline clients, and will make it possible to deliver
<store /> messages to offline clients when MAM is not available. Prosody is going to support this kind of behavior soon, but random resources will make Gajim look like different clients on each connection.
For example, let there be two resources connected, "Conversations.foo" and "Gajim.bar". Then "Gajim.bar" disconnects and bare JID receives a message. It is delivered to "Conversations.foo" and stored for "Gajim.bar". But then Gajim reconnects with "Gajim.baz" resource, so message is stored for "Gajim.bar" until it times out, and "Gajim.baz" never receives a message.
If there is an agreement that it should be fixed, I would like to try to implement it.