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:
Goffi 2019-09-25 08:56:41 +02:00
commit 76aadbb3fb

View file

@ -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]