diff options
author | lovetox <philipp@hoerist.com> | 2020-04-30 20:57:38 +0300 |
---|---|---|
committer | lovetox <philipp@hoerist.com> | 2020-04-30 20:57:38 +0300 |
commit | e17391314595b2eb86c1f9598010103b8e87ab7b (patch) | |
tree | af5198406845b3608434e05ff46ab898b9d3557d /pgp/modules | |
parent | e5a43b1c0c500b381a6d825eac5d9e0a5464444c (diff) |
[pgp] Don't use deprecated attribute
Diffstat (limited to 'pgp/modules')
-rw-r--r-- | pgp/modules/pgp_legacy.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pgp/modules/pgp_legacy.py b/pgp/modules/pgp_legacy.py index b2b2880..1fa3190 100644 --- a/pgp/modules/pgp_legacy.py +++ b/pgp/modules/pgp_legacy.py @@ -168,7 +168,7 @@ class PGPLegacy(BaseModule): return self._cleanup_stanza(event) - self._create_pgp_legacy_message(event.msg_iq, encrypted_payload) + self._create_pgp_legacy_message(event.stanza, encrypted_payload) event.xhtml = None event.encrypted = 'PGP' @@ -253,15 +253,15 @@ class PGPLegacy(BaseModule): def _cleanup_stanza(obj): ''' We make sure only allowed tags are in the stanza ''' stanza = nbxmpp.Message( - to=obj.msg_iq.getTo(), - typ=obj.msg_iq.getType()) + to=obj.stanza.getTo(), + typ=obj.stanza.getType()) stanza.setID(obj.stanza_id) - stanza.setThread(obj.msg_iq.getThread()) + stanza.setThread(obj.stanza.getThread()) for tag, ns in ALLOWED_TAGS: - node = obj.msg_iq.getTag(tag, namespace=ns) + node = obj.stanza.getTag(tag, namespace=ns) if node: stanza.addChild(node=node) - obj.msg_iq = stanza + obj.stanza = stanza def encrypt_file(self, file, callback): thread = threading.Thread(target=self._encrypt_file_thread, |