plugin XEP-0060: getItem(s), publish and (un)subscribe are now coroutines
This commit is contained in:
parent
a3e6425eb2
commit
bab851006f
1 changed files with 165 additions and 161 deletions
|
|
@ -627,8 +627,7 @@ class PubsubSchema(object):
|
|||
extra = data_format.deserialise(extra)
|
||||
return client, service, node or None, schema, item_id or None, extra
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def copyMissingValues(self, client, service, node, item_id, form_ns, values):
|
||||
async def copyMissingValues(self, client, service, node, item_id, form_ns, values):
|
||||
"""Retrieve values existing in original item and missing in update
|
||||
|
||||
Existing item will be retrieve, and values not already specified in values will
|
||||
|
|
@ -643,7 +642,7 @@ class PubsubSchema(object):
|
|||
"""
|
||||
try:
|
||||
# we get previous item
|
||||
items_data = yield self._p.getItems(
|
||||
items_data = await self._p.getItems(
|
||||
client, service, node, item_ids=[item_id]
|
||||
)
|
||||
item_elt = items_data[0][0]
|
||||
|
|
|
|||
Loading…
Reference in a new issue