diff --git a/slixmpp_omemo/__init__.py b/slixmpp_omemo/__init__.py index d4d9bba..cc1cec3 100644 --- a/slixmpp_omemo/__init__.py +++ b/slixmpp_omemo/__init__.py @@ -302,7 +302,9 @@ class XEP_0384(BasePlugin): self._store_device_ids(bare_jid, items) items = list(items) - device_ids = [int(d['id']) for d in items[0]['devices']] + device_ids = [] + if items: + device_ids = [int(d['id']) for d in items[0]['devices']] if bare_jid == self.xmpp.boundjid.bare and \ self._device_id not in device_ids: