diff --git a/slixmpp_omemo/__init__.py b/slixmpp_omemo/__init__.py index 0b81463..9d74a92 100644 --- a/slixmpp_omemo/__init__.py +++ b/slixmpp_omemo/__init__.py @@ -116,7 +116,7 @@ def _generate_encrypted_payload(encrypted) -> Encrypted: if 'payload' in encrypted: tag['payload']['value'] = b64enc(encrypted['payload']) - for bare_jid, devices in encrypted['keys'].items(): + for devices in encrypted['keys'].values(): for rid, device in devices.items(): key = Key() key['value'] = b64enc(device['data'])