Prevent accessing list index when no device is available also in _store_device_ids

Signed-off-by: Maxime Buquet's avatarMaxime “pep” Buquet <>
parent 7449e5c9
......@@ -286,6 +286,7 @@ class XEP_0384(BasePlugin):
"""Store Device list"""
device_ids = [] # type: List[int]
items = list(items)
if items:
device_ids = [int(d['id']) for d in items[0]['devices']]
return self._omemo.newDeviceList(str(jid), device_ids)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment