diff --git a/slixmpp_omemo/__init__.py b/slixmpp_omemo/__init__.py index cc1cec3..e3bbd28 100644 --- a/slixmpp_omemo/__init__.py +++ b/slixmpp_omemo/__init__.py @@ -286,7 +286,8 @@ class XEP_0384(BasePlugin): """Store Device list""" device_ids = [] # type: List[int] items = list(items) - device_ids = [int(d['id']) for d in items[0]['devices']] + if items: + device_ids = [int(d['id']) for d in items[0]['devices']] return self._omemo.newDeviceList(str(jid), device_ids) def _receive_device_list(self, msg: Message) -> None: