diff --git a/sat/plugins/plugin_sec_otr.py b/sat/plugins/plugin_sec_otr.py index 54b1866a..bfa6b285 100644 --- a/sat/plugins/plugin_sec_otr.py +++ b/sat/plugins/plugin_sec_otr.py @@ -260,6 +260,7 @@ class ContextManager(object): class OTR(object): + def __init__(self, host): log.info(_(u"OTR plugin initialization")) self.host = host @@ -306,7 +307,7 @@ class OTR(object): type_=C.MENU_SINGLE, ) host.trigger.add("presenceReceived", self._presenceReceivedTrigger) - self.host.registerEncryptionPlugin(self, u"OTR", NS_OTR) + self.host.registerEncryptionPlugin(self, u"OTR", NS_OTR, directed=True) def _skipOTR(self, profile): """Tell the backend to not handle OTR for this profile. @@ -621,6 +622,7 @@ class OTR(object): raise failure.Failure( exceptions.CancelError("Cancelled by OTR") ) # no message at all (no history, no signal) + client.encryption.markAsEncrypted(data) return data def _receivedTreatmentForSkippedProfiles(self, data):