Mercurial > libervia-backend
comparison sat/plugins/plugin_sec_otr.py @ 2811:a26b1ad2d3a4
plugin OTR: disabled menu as the new generic encryption menu allows to start/stop OTR or display the trust UI.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 24 Feb 2019 14:12:06 +0100 |
parents | 003b8b4b56a7 |
children | ba2e03ee7c4f |
comparison
equal
deleted
inserted
replaced
2810:c161a294fffd | 2811:a26b1ad2d3a4 |
---|---|
323 "skipOTR", ".plugin", in_sign="s", out_sign="", method=self._skipOTR | 323 "skipOTR", ".plugin", in_sign="s", out_sign="", method=self._skipOTR |
324 ) # FIXME: must be removed, must be done on per-message basis | 324 ) # FIXME: must be removed, must be done on per-message basis |
325 host.bridge.addSignal( | 325 host.bridge.addSignal( |
326 "otrState", ".plugin", signature="sss" | 326 "otrState", ".plugin", signature="sss" |
327 ) # args: state, destinee_jid, profile | 327 ) # args: state, destinee_jid, profile |
328 host.importMenu( | 328 # XXX: menus are disabled in favor to the new more generic encryption menu |
329 (OTR_MENU, D_(u"Start/Refresh")), | 329 # there are let here commented for a little while as a reference |
330 self._otrStartRefresh, | 330 # host.importMenu( |
331 security_limit=0, | 331 # (OTR_MENU, D_(u"Start/Refresh")), |
332 help_string=D_(u"Start or refresh an OTR session"), | 332 # self._otrStartRefresh, |
333 type_=C.MENU_SINGLE, | 333 # security_limit=0, |
334 ) | 334 # help_string=D_(u"Start or refresh an OTR session"), |
335 host.importMenu( | 335 # type_=C.MENU_SINGLE, |
336 (OTR_MENU, D_(u"End session")), | 336 # ) |
337 self._otrSessionEnd, | 337 # host.importMenu( |
338 security_limit=0, | 338 # (OTR_MENU, D_(u"End session")), |
339 help_string=D_(u"Finish an OTR session"), | 339 # self._otrSessionEnd, |
340 type_=C.MENU_SINGLE, | 340 # security_limit=0, |
341 ) | 341 # help_string=D_(u"Finish an OTR session"), |
342 host.importMenu( | 342 # type_=C.MENU_SINGLE, |
343 (OTR_MENU, D_(u"Authenticate")), | 343 # ) |
344 self._otrAuthenticate, | 344 # host.importMenu( |
345 security_limit=0, | 345 # (OTR_MENU, D_(u"Authenticate")), |
346 help_string=D_(u"Authenticate user/see your fingerprint"), | 346 # self._otrAuthenticate, |
347 type_=C.MENU_SINGLE, | 347 # security_limit=0, |
348 ) | 348 # help_string=D_(u"Authenticate user/see your fingerprint"), |
349 host.importMenu( | 349 # type_=C.MENU_SINGLE, |
350 (OTR_MENU, D_(u"Drop private key")), | 350 # ) |
351 self._dropPrivKey, | 351 # host.importMenu( |
352 security_limit=0, | 352 # (OTR_MENU, D_(u"Drop private key")), |
353 type_=C.MENU_SINGLE, | 353 # self._dropPrivKey, |
354 ) | 354 # security_limit=0, |
355 # type_=C.MENU_SINGLE, | |
356 # ) | |
355 host.trigger.add("presenceReceived", self._presenceReceivedTrigger) | 357 host.trigger.add("presenceReceived", self._presenceReceivedTrigger) |
356 self.host.registerEncryptionPlugin(self, u"OTR", NS_OTR, directed=True) | 358 self.host.registerEncryptionPlugin(self, u"OTR", NS_OTR, directed=True) |
357 | 359 |
358 def _skipOTR(self, profile): | 360 def _skipOTR(self, profile): |
359 """Tell the backend to not handle OTR for this profile. | 361 """Tell the backend to not handle OTR for this profile. |