don't allow to send xhtml when gpg is active (because this part is not encrypted). Fixes #4650

This commit is contained in:
Yann Leboulanger 2009-01-16 15:01:36 +00:00
parent 77b5c85f18
commit e629ceb637
2 changed files with 3 additions and 1 deletions

View File

@ -1232,7 +1232,8 @@ class ChatControl(ChatControlBase):
def update_toolbar(self):
# Formatting
if gajim.capscache.is_supported(self.contact, NS_XHTML_IM) \
and not gajim.capscache.is_supported(self.contact, 'notexistant'):
and not gajim.capscache.is_supported(self.contact, 'notexistant') \
and not self.gpg_is_active:
self._formattings_button.set_sensitive(True)
else:
self._formattings_button.set_sensitive(False)

View File

@ -1162,6 +1162,7 @@ class Connection(ConnectionHandlers):
fjid = str(session.jid)
if keyID and self.USE_GPG:
xhtml = None
if keyID == 'UNKNOWN':
error = _('Neither the remote presence is signed, nor a key was assigned.')
elif keyID.endswith('MISMATCH'):