xep_0384: Rename list plugin_attrib to devices
This commit is contained in:
parent
9100f9899b
commit
dbd6b3ad3d
2 changed files with 5 additions and 5 deletions
2
omemo.py
2
omemo.py
|
@ -47,7 +47,7 @@ class XEP_0384(BasePlugin):
|
|||
jid = JID(msg['from']).bare
|
||||
items = msg['pubsub_event']['items']
|
||||
for item in items:
|
||||
device_ids = [d['id'] for d in item['list']]
|
||||
device_ids = [d['id'] for d in item['devices']]
|
||||
if jid not in self.device_ids:
|
||||
self.device_ids[jid] = device_ids
|
||||
self.xmpp.event('omemo_device_ids', (jid, device_ids))
|
||||
|
|
|
@ -15,10 +15,10 @@ OMEMO_DEVICES_NS = OMEMO_BASE_NS + '.devicelist'
|
|||
OMEMO_BUNDLE_NS = OMEMO_BASE_NS + '.bundle'
|
||||
|
||||
|
||||
class ItemList(ElementBase):
|
||||
class Devices(ElementBase):
|
||||
namespace = OMEMO_BASE_NS
|
||||
name = 'list'
|
||||
plugin_attrib = 'list'
|
||||
plugin_attrib = 'devices'
|
||||
interfaces = set()
|
||||
|
||||
|
||||
|
@ -34,5 +34,5 @@ class Device(ElementBase):
|
|||
return children[0]
|
||||
|
||||
|
||||
register_stanza_plugin(EventItem, ItemList)
|
||||
register_stanza_plugin(ItemList, Device, iterable=True)
|
||||
register_stanza_plugin(EventItem, Devices)
|
||||
register_stanza_plugin(Devices, Device, iterable=True)
|
||||
|
|
Loading…
Reference in a new issue