attach an unencrypted explanatory body to XEP-0200 encrypted messages

This commit is contained in:
Brendan Taylor 2008-08-03 16:46:27 +00:00
parent 6967ced458
commit 615ed1be06
1 changed files with 4 additions and 1 deletions

View File

@ -249,6 +249,9 @@ class EncryptedStanzaSession(StanzaSession):
c.NT.mac = base64.b64encode(self.hmac(self.km_s, m_content + \
crypto.encode_mpi(old_en_counter)))
stanza.setBody(_('[This message is part of an encrypted session. '
'If you see this message, something went wrong.]'))
return stanza
def is_xep_200_encrypted(self, msg):
@ -950,4 +953,4 @@ otherwise, list the fields we haven't implemented'''
self.km_o = ''
# vim: se ts=3:
# vim: se ts=3: