Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim-plugins.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/omemo
diff options
context:
space:
mode:
authorPhilipp Hörist <forenjunkie@chello.at>2017-06-11 01:09:20 +0300
committerPhilipp Hörist <forenjunkie@chello.at>2017-06-11 01:11:42 +0300
commit8db1bee024a0e2e937754193278497ff631254ea (patch)
treef3fe0cac38d39f8d754a30c5a3bded82f6558762 /omemo
parentd020e4ffab065546a2f6fb471ea9172551c75819 (diff)
[omemo] Let gajim-core issue a warning on plain text
Diffstat (limited to 'omemo')
-rw-r--r--omemo/omemoplugin.py34
1 files changed, 0 insertions, 34 deletions
diff --git a/omemo/omemoplugin.py b/omemo/omemoplugin.py
index 962cb21..3734b1a 100644
--- a/omemo/omemoplugin.py
+++ b/omemo/omemoplugin.py
@@ -428,18 +428,6 @@ class OmemoPlugin(GajimPlugin):
msg.encrypted = self.encryption_name
return
- elif msg.msg_.getTag('body'):
- account = msg.conn.name
-
- from_jid = str(msg.msg_.getAttr('from'))
- from_jid = gajim.get_jid_without_resource(from_jid)
-
- state = self.get_omemo_state(account)
- encryption = gajim.config.get_per('contacts', from_jid, 'encryption')
-
- if encryption == 'OMEMO':
- msg.msgtxt = '**Unencrypted** ' + msg.msgtxt
-
def _message_received(self, msg):
""" Handles an incoming message
@@ -520,22 +508,6 @@ class OmemoPlugin(GajimPlugin):
msg.stanza.setBody(plaintext)
msg.encrypted = self.encryption_name
- elif msg.stanza.getTag('body'):
- account = msg.conn.name
-
- from_jid = str(msg.stanza.getFrom())
- jid = gajim.get_jid_without_resource(from_jid)
- state = self.get_omemo_state(account)
- encryption = gajim.config.get_per('contacts', jid, 'encryption')
-
- if encryption == 'OMEMO':
- msg.msgtxt = '**Unencrypted** ' + msg.msgtxt
- msg.stanza.setBody(msg.msgtxt)
-
- ctrl = gajim.interface.msg_win_mgr.get_control(jid, account)
- if ctrl:
- self.plain_warning(ctrl)
-
def room_memberlist_received(self, event):
account = event.conn.name
if account in self.disabled_accounts:
@@ -1108,12 +1080,6 @@ class OmemoPlugin(GajimPlugin):
log.debug('-'*15)
@staticmethod
- def plain_warning(chat_control):
- chat_control.print_conversation_line(
- 'Received plaintext message! ' +
- 'Your next message will still be encrypted!', 'status', '', None)
-
- @staticmethod
def no_trusted_fingerprints_warning(chat_control):
msg = "To send an encrypted message, you have to " \
"first trust the fingerprint of your contact!"