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
|
|
@ -254,7 +254,7 @@ class InvitationsPlugin(object):
|
|||
try:
|
||||
yield self.host.plugins['XEP-0077'].registerNewAccount(jid_,
|
||||
password)
|
||||
except error.StanzaError as e:
|
||||
except error.StanzaError:
|
||||
idx += 1
|
||||
else:
|
||||
break
|
||||
|
|
@ -321,7 +321,7 @@ class InvitationsPlugin(object):
|
|||
format_args['url'] = invite_url
|
||||
|
||||
yield sat_email.sendEmail(
|
||||
self.host,
|
||||
self.host.memory.config,
|
||||
[email] + emails_extra,
|
||||
(kwargs.pop('message_subject', None) or DEFAULT_SUBJECT).format(
|
||||
**format_args),
|
||||
|
|
@ -401,7 +401,7 @@ class InvitationsPlugin(object):
|
|||
C.PROF_KEY_NONE: don't filter invitations
|
||||
@return list(unicode): invitations uids
|
||||
"""
|
||||
invitations = yield list(self.invitations.items())
|
||||
invitations = yield self.invitations.items()
|
||||
if profile != C.PROF_KEY_NONE:
|
||||
invitations = {id_:data for id_, data in invitations.items()
|
||||
if data.get('profile') == profile}
|
||||
|
|
|
|||
Loading…
Reference in a new issue