fix GPG mysteriously turning on when you open a chat window
This commit is contained in:
parent
32b56a2328
commit
5d6b60be68
|
@ -1843,6 +1843,8 @@ class ChatControl(ChatControlBase):
|
|||
msg = _('The following message was encrypted')
|
||||
ChatControlBase.print_conversation_line(self, msg, 'status', '',
|
||||
tim)
|
||||
# turn on OpenPGP if this was in fact a XEP-0027 encrypted message
|
||||
if encrypted == 'xep27':
|
||||
self._toggle_gpg()
|
||||
elif not encrypted and self.gpg_is_active:
|
||||
msg = _('The following message was NOT encrypted')
|
||||
|
|
|
@ -1741,7 +1741,7 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream, ConnectionDisco,
|
|||
tim = localtime(timegm(tim))
|
||||
|
||||
if xep_200_encrypted:
|
||||
encrypted = True
|
||||
encrypted = 'xep200'
|
||||
|
||||
try:
|
||||
msg = session.decrypt_stanza(msg)
|
||||
|
@ -1781,7 +1781,7 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream, ConnectionDisco,
|
|||
decmsg = self.gpg.decrypt(encmsg, keyID)
|
||||
# \x00 chars are not allowed in C (so in GTK)
|
||||
msgtxt = decmsg.replace('\x00', '')
|
||||
encrypted = True
|
||||
encrypted = 'xep27'
|
||||
if mtype == 'error':
|
||||
self.dispatch_error_message(msg, msgtxt, session, frm, tim)
|
||||
elif mtype == 'groupchat':
|
||||
|
|
Loading…
Reference in New Issue