jp: jp asyncio port:
/!\ this commit is huge. Jp is temporarily not working with `dbus` bridge /!\ This patch implements the port of jp to asyncio, so it is now correctly using the bridge asynchronously, and it can be used with bridges like `pb`. This also simplify the code, notably for things which were previously implemented with many callbacks (like pagination with RSM). During the process, some behaviours have been modified/fixed, in jp and backends, check diff for details.
This commit is contained in:
parent
5cee4fbab7
commit
76aadbb3fb
1 changed files with 3299 additions and 3300 deletions
|
|
@ -560,9 +560,11 @@ class Memory(object):
|
|||
|
||||
def initPersonalKey(__):
|
||||
# be sure to call this after checking that the profile doesn't exist yet
|
||||
|
||||
# generated once for all and saved in a PersistentDict
|
||||
personal_key = BlockCipher.getRandomKey(
|
||||
base64=True
|
||||
) # generated once for all and saved in a PersistentDict
|
||||
).decode('utf-8')
|
||||
self.auth_sessions.newSession(
|
||||
{C.MEMORY_CRYPTO_KEY: personal_key}, profile=name
|
||||
) # will be encrypted by setParam
|
||||
|
|
@ -1260,8 +1262,8 @@ class Memory(object):
|
|||
parent = current["parent"]
|
||||
if not parent:
|
||||
break
|
||||
files_data = yield self.getFile(
|
||||
self, client, peer_jid=None, file_id=parent, perms_to_check=None
|
||||
files_data = yield self.getFiles(
|
||||
client, peer_jid=None, file_id=parent, perms_to_check=None
|
||||
)
|
||||
try:
|
||||
current = files_data[0]
|
||||
|
|
|
|||
Loading…
Reference in a new issue