diff options
author | Philipp Hörist <forenjunkie@chello.at> | 2017-06-02 04:18:19 +0300 |
---|---|---|
committer | Philipp Hörist <forenjunkie@chello.at> | 2017-06-02 04:18:19 +0300 |
commit | 5f17bcac22edd7d5b0927d306d994bde28350b58 (patch) | |
tree | 9d8c508433add7d737dfba7bb8a7065f2f3d1aa4 /omemo | |
parent | 86afb2cacc10c1560404c2320dc6809c894a016b (diff) |
[omemo] Dont handle LMC differently
A patch in Gajim made that unnecessary
Diffstat (limited to 'omemo')
-rw-r--r-- | omemo/omemoplugin.py | 22 |
1 files changed, 3 insertions, 19 deletions
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( |