a single target is the most common case, but QuickWidget handle multiple targets. When a single target is requested and multiple exist, a random one is returned.
This is a temporary situation, targetting should be improved in a future version to manage multiple targets in hash.
when a widget was recreated, a new hash was created with a suffix, making hash matching difficult and bug prone.
This has been changed to use a list of instances instead, this simplify the code and avoid issues while looking for existing instances of a widget.
QuickWidget implement base of sync mechanism with a sync property which can be overriden, and resync method which is called when resynchronisation is needed.
When resync is required, chat widget get missing occupant and history elements
A new callable argument can be used with historyPrint, when set it is called when history has been fully printed.
in newMessage handler, full jid was sometime used for target, while is should always be bare jid. Full jid is used in the messageNew method of each widget.
if AUTO_RESYNC is False, frontend must call itself the resync method.
This is useful to improve performance, resynchronising all widgets at once may be resource intensive, and it may be more efficient to resync a widget only when it is visible.
on some frontend (notably on mobiles) frontend can be paused and lose synchronisation with backend, this can also happen if backend restart a connexion without resuming using stream management. To manage that, QuickApp now has a sync attribute which is True when the backend is in sync with frontend.
When synchronisation has been lost and is possible again, all widget will have their "resync" method called, which can be used to do necessary calls to update the status.
It's the responsability of each widget to then reset the "sync" attribute, once everything has been resynchronised.
state handling is not using mmap anymore but an unix socket instead.
State change can now be managed.
Bridge signals are disabled when frontend is paused.
- public bundles are now retrieved only when needed (i.e. on MissingBundleException when encrypting a message)
- a feedback is given to user when a message is received but it has not been encrypted for our device
- fixed feedback on decryption error if message come from an other device of the client (i.e. it's a carbon copy)
- setBundle if called in a "finally" if republish_bundle is set after decrypting a message
- carbon prioriy must be bigger than ones of encryption plugins, because the carbon copied messages must be unwrapped to be decrypted, this patch fixes it
- "sent" carbon elements was only stored and notified to frontends, it is now unwrapped and injected in normal traffic, this way other plugin can manage it, in particular encrypted elements can be decrypted
jid caching in Twisted use a dict (__internJIDs) which associate a jid as string to its jid.JID instance.
But this caching doesn't handle mutability of the objects, resulting wrong jid returned when a modification is done (e.g. if resource is changed).
This is a temporary workaround until the patch is proposed and merged upstream.
note: this is a partial fix because the caching is also leaking memory (cf. https://twistedmatrix.com/trac/ticket/5122)
"-C" now allow comment and "--no-comments" explicitly disable it. This way when none of this option is used, the current state of the item is kept without deleting accidentaly the comments node.