plugin OTR: use new "directed" attribute when registering + use new markAsEncrypted
This commit is contained in:
parent
e4bda681b8
commit
e18036d2fb
1 changed files with 3 additions and 1 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue