Mercurial > libervia-backend
comparison sat/plugins/plugin_misc_identity.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 | 213e83a4ed10 |
comparison
equal
deleted
inserted
replaced
3540:aa58451b77ba | 3541:888109774673 |
---|---|
140 client._identity_storage = persistent.LazyPersistentBinaryDict( | 140 client._identity_storage = persistent.LazyPersistentBinaryDict( |
141 "identity", client.profile) | 141 "identity", client.profile) |
142 | 142 |
143 stored_data = await client._identity_storage.all() | 143 stored_data = await client._identity_storage.all() |
144 | 144 |
145 self.host.memory.storage.getPrivates( | |
146 namespace="identity", binary=True, profile=client.profile) | |
147 | |
148 to_delete = [] | 145 to_delete = [] |
149 | 146 |
150 for key, value in stored_data.items(): | 147 for key, value in stored_data.items(): |
151 entity_s, name = key.split('\n') | 148 entity_s, name = key.split('\n') |
152 if name not in self.metadata.keys(): | 149 if name not in self.metadata.keys(): |