From 5f17bcac22edd7d5b0927d306d994bde28350b58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Fri, 2 Jun 2017 03:18:19 +0200 Subject: [omemo] Dont handle LMC differently A patch in Gajim made that unnecessary --- omemo/omemoplugin.py | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) (limited to 'omemo/omemoplugin.py') diff --git a/omemo/omemoplugin.py b/omemo/omemoplugin.py index b017c02..4720185 100644 --- a/omemo/omemoplugin.py +++ b/omemo/omemoplugin.py @@ -27,7 +27,7 @@ import shutil import nbxmpp from nbxmpp.simplexml import Node -from nbxmpp import NS_CORRECT, NS_ADDRESS +from nbxmpp import NS_ADDRESS import dialogs from common import caps_cache, gajim, ged, configpaths @@ -624,20 +624,12 @@ class OmemoPlugin(GajimPlugin): if account in self.disabled_accounts: return try: - # If we send a correction msg, the stanza is saved - # in correction_msg - if event.correction_msg: - event.msg_iq = event.correction_msg if not event.msg_iq.getTag('body'): return state = self.get_omemo_state(account) full_jid = str(event.msg_iq.getAttr('to')) to_jid = gajim.get_jid_without_resource(full_jid) - # Delete previous Message out of Correction Message Stanza - if event.msg_iq.getTag('replace', namespace=NS_CORRECT): - event.msg_iq.delChild('encrypted', attrs={'xmlns': NS_OMEMO}) - plaintext = event.msg_iq.getBody() msg_dict = state.create_gc_msg( gajim.get_jid_from_account(account), @@ -668,12 +660,8 @@ class OmemoPlugin(GajimPlugin): # Store Hint for MAM store = Node('store', attrs={'xmlns': NS_HINTS}) event.msg_iq.addChild(node=store) - if event.correction_msg: - event.correction_msg = event.msg_iq - event.msg_iq = None - self.print_msg_to_log(event.correction_msg) - else: - self.print_msg_to_log(event.msg_iq) + + self.print_msg_to_log(event.msg_iq) callback(event) except Exception as e: @@ -705,10 +693,6 @@ class OmemoPlugin(GajimPlugin): full_jid = str(event.msg_iq.getAttr('to')) to_jid = gajim.get_jid_without_resource(full_jid) - # Delete previous Message out of Correction Message Stanza - if event.msg_iq.getTag('replace', namespace=NS_CORRECT): - event.msg_iq.delChild('encrypted', attrs={'xmlns': NS_OMEMO}) - plaintext = event.msg_iq.getBody().encode('utf8') msg_dict = state.create_msg( -- cgit v1.2.3