Mercurial > libervia-backend
comparison sat/plugins/plugin_xep_0198.py @ 3541:888109774673
core: various changes and fixes to work with new storage and D-Bus bridge:
- fixes coroutines handling in various places
- fixes types which are not serialised by Tx DBus
- XEP-0384: call storage methods in main thread in XEP: Python OMEMO's Promise use thread
which prevent the use of AsyncIO loop. To work around that, callLater is used to launch
storage method in main thread. This is a temporary workaround, as Python OMEMO should
get rid of Promise implementation and threads soon.
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 03 Jun 2021 15:21:43 +0200 |
parents | be6d91572633 |
children | 32d714a8ea51 |
comparison
equal
deleted
inserted
replaced
3540:aa58451b77ba | 3541:888109774673 |
---|---|
446 d.addCallback(lambda __: client.roster.requestRoster()) | 446 d.addCallback(lambda __: client.roster.requestRoster()) |
447 # we add got_roster to be sure to have roster before sending initial presence | 447 # we add got_roster to be sure to have roster before sending initial presence |
448 d.addCallback(lambda __: client.roster.got_roster) | 448 d.addCallback(lambda __: client.roster.got_roster) |
449 if plg_0313 is not None: | 449 if plg_0313 is not None: |
450 # we retrieve one2one MAM archives | 450 # we retrieve one2one MAM archives |
451 d.addCallback(lambda __: plg_0313.resume(client)) | 451 d.addCallback(lambda __: defer.ensureDeferred(plg_0313.resume(client))) |
452 # initial presence must be sent manually | 452 # initial presence must be sent manually |
453 d.addCallback(lambda __: client.presence.available()) | 453 d.addCallback(lambda __: client.presence.available()) |
454 if plg_0045 is not None: | 454 if plg_0045 is not None: |
455 # we re-join MUC rooms | 455 # we re-join MUC rooms |
456 muc_d_list = defer.DeferredList( | 456 muc_d_list = defer.DeferredList( |