those methods can be called by platform specific plugins when network is known to be (un)available. This way, connection attempts can be cancelled when no network is available, saving resources (notably battery on mobile devices), or attempts can be restarted immediately when network is known to be available again.
factory's clientConnectionFailed and clientConnectionLost methods are monkey patched to allow client to tune termination:
- a warning when connection is lost in an unclean way
- connector is saved to allow to disable automatic reconnection and retry manually later
- new triggers connection_failed and connection_lost allow plugins to tune connection termination workflow
when avatar is shown by ImageMagick's display and it is terminated using SIGINT, the return code is 2 and not 0.
Before this patch, jp was interpreting the 2 as an image not displayed and so was trying with the next available command
Now it is stopping when exit code 2 is received.
- new MessageWidget class, to have a common ancestor for widgets from different frontends
- new message_widgets_rev property to get reverse iterator on message widgets
- new isUserMoved method to check if a Message is a user moved info
- new handleUserMoved method to merge info message when suitable. This is code from Primitivus made generic.
Client State Indication plugin is used to set state when pause/resume is called.
The state is changed on pause only after a delay (currently 30s), to avoid changing state if use is only checking something quickly on an other app.
req_timer may not have been called when session.reset() is called (e.g. on resuming failed after computer has been suspended), so reset() must cancel it and set its value to None.
in addition to listeners, a frontend can now register progression callback and errback which are called when the given progressing action is finished.
Those callbacks can be registered using registerProgressCbs or specified in actionManager.
encryptMessage is now called in a loop, because problems may happen by steps (e.g. trust issue after getting missing bundles).
Fixed a mix between "if" and "elif" in problems handling,
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.