Mercurial > libervia-backend
comparison sat/plugins/plugin_sec_otr.py @ 2753:3dd265d281e1
plugin OTR: fixed a bug which was tagging every message as "encrypted"
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 04 Jan 2019 18:46:39 +0100 |
parents | da59ff099b32 |
children | 003b8b4b56a7 |
comparison
equal
deleted
inserted
replaced
2752:1fa615faec8b | 2753:3dd265d281e1 |
---|---|
692 # history | 692 # history |
693 else: | 693 else: |
694 raise failure.Failure( | 694 raise failure.Failure( |
695 exceptions.CancelError("Cancelled by OTR") | 695 exceptions.CancelError("Cancelled by OTR") |
696 ) # no message at all (no history, no signal) | 696 ) # no message at all (no history, no signal) |
697 client.encryption.markAsEncrypted(data) | 697 |
698 trusted = otrctx.isTrusted() | 698 client.encryption.markAsEncrypted(data) |
699 | 699 trusted = otrctx.isTrusted() |
700 if trusted: | 700 |
701 client.encryption.markAsTrusted(data) | 701 if trusted: |
702 else: | 702 client.encryption.markAsTrusted(data) |
703 client.encryption.markAsUntrusted(data) | 703 else: |
704 client.encryption.markAsUntrusted(data) | |
704 | 705 |
705 return data | 706 return data |
706 | 707 |
707 def _receivedTreatmentForSkippedProfiles(self, data): | 708 def _receivedTreatmentForSkippedProfiles(self, data): |
708 """This profile must be skipped because the frontend manages OTR itself, | 709 """This profile must be skipped because the frontend manages OTR itself, |