Currently, bundles are fetched as soon as a device list update occurs.
By the spec, the bundle should be fetched just before the first message is sent. Therefore we need some queueing mechanism for the message to wait until the bundle info for all devices is received.
So, the implementation needs to store the sender jid, receiver jid, plaintext message, creation timestamp and some timeouts for events e.g. no bundle received, not all devices trusted etc.
Maybe in the form of an abstract class which subclasses have to implement process, on_warning, on_error.
Currently, bundles are fetched as soon as a device list update occurs.
By the spec, the bundle should be fetched just before the first message is sent. Therefore we need some queueing mechanism for the message to wait until the bundle info for all devices is received.
So, the implementation needs to store the sender jid, receiver jid, plaintext message, creation timestamp and some timeouts for events e.g. no bundle received, not all devices trusted etc.
Maybe in the form of an abstract class which subclasses have to implement process, on_warning, on_error.