changeset aae1de9a8e68 in /home/hg/repos/gajim-plugins
author: lovetox forenjunkie@chello.at branches: details:gajim-plugins?cmd=changeset;node=aae1de9a8e68 description: Redundant function unpack_message() removed
diffstat:
omemo/__init__.py | 5 +++-- omemo/xmpp.py | 9 --------- 2 files changed, 3 insertions(+), 11 deletions(-)
diffs (41 lines):
diff -r 2c65f261882e -r aae1de9a8e68 omemo/__init__.py --- a/omemo/__init__.py Sun May 29 01:14:07 2016 +0200 +++ b/omemo/__init__.py Sun May 29 11:45:46 2016 +0200 @@ -34,7 +34,7 @@ from .xmpp import ( NS_NOTIFY, NS_OMEMO, BundleInformationAnnouncement, BundleInformationQuery, DeviceListAnnouncement, DevicelistPEP, OmemoMessage, successful, - unpack_device_bundle, unpack_device_list_update, unpack_message) + unpack_device_bundle, unpack_device_list_update, unpack_encrypted)
iq_ids_to_callbacks = {} @@ -141,7 +141,8 @@ else: from_jid = str(msg.stanza.getAttr('from'))
- msg_dict = unpack_message(msg.stanza) + msg_dict = unpack_encrypted(msg.stanza.getTag + ('encrypted', namespace=NS_OMEMO)) msg_dict['sender_jid'] = gajim.get_jid_without_resource(from_jid) plaintext = state.decrypt_msg(msg_dict)
diff -r 2c65f261882e -r aae1de9a8e68 omemo/xmpp.py --- a/omemo/xmpp.py Sun May 29 01:14:07 2016 +0200 +++ b/omemo/xmpp.py Sun May 29 11:45:46 2016 +0200 @@ -137,15 +137,6 @@
@log_calls('OmemoPlugin') -def unpack_message(msg): - encrypted_node = msg.getTag('encrypted', namespace=NS_OMEMO) - if not encrypted_node: - log.debug('Message does not have encrypted node') - - return unpack_encrypted(encrypted_node) - - -@log_calls('OmemoPlugin') def unpack_device_bundle(bundle, device_id): pubsub = bundle.getTag('pubsub', namespace=NS_PUBSUB) if not pubsub: