Mercurial > libervia-backend
comparison sat_frontends/bridge/dbus_bridge.py @ 2743:da59ff099b32
core (memory/encryption), plugin OTR: finished OTR integration in encryption:
- messageEncryptionStart and messageEncryptionStop are now async
- an encryption plugin can now have a startEncryption and endEncryption method, which are called automatically when suitable
- trust is now put in "trusted" key of message_data, and markAsTrusted has been added, it is used in OTR
- getTrustUI implemented for OTR, using legacy authenticate code
- catch potr.crypt.InvalidParameterError on decryption
- fixed some service OTR messages which were not correctly marked as not for storing, and thus were added to MAM archive/carbon copied
- other bug fixes
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 03 Jan 2019 21:00:00 +0100 |
parents | e347e32aa07f |
children | 003b8b4b56a7 |
comparison
equal
deleted
inserted
replaced
2742:1f5b02623355 | 2743:da59ff099b32 |
---|---|
560 error_handler = None | 560 error_handler = None |
561 else: | 561 else: |
562 if errback is None: | 562 if errback is None: |
563 errback = log.error | 563 errback = log.error |
564 error_handler = lambda err:errback(dbus_to_bridge_exception(err)) | 564 error_handler = lambda err:errback(dbus_to_bridge_exception(err)) |
565 kwargs={} | 565 return self.db_core_iface.messageEncryptionStart(to_jid, namespace, replace, profile_key, timeout=const_TIMEOUT, reply_handler=callback, error_handler=error_handler) |
566 if callback is not None: | |
567 kwargs['timeout'] = const_TIMEOUT | |
568 kwargs['reply_handler'] = callback | |
569 kwargs['error_handler'] = error_handler | |
570 return self.db_core_iface.messageEncryptionStart(to_jid, namespace, replace, profile_key, **kwargs) | |
571 | 566 |
572 def messageEncryptionStop(self, to_jid, profile_key, callback=None, errback=None): | 567 def messageEncryptionStop(self, to_jid, profile_key, callback=None, errback=None): |
573 if callback is None: | 568 if callback is None: |
574 error_handler = None | 569 error_handler = None |
575 else: | 570 else: |
576 if errback is None: | 571 if errback is None: |
577 errback = log.error | 572 errback = log.error |
578 error_handler = lambda err:errback(dbus_to_bridge_exception(err)) | 573 error_handler = lambda err:errback(dbus_to_bridge_exception(err)) |
579 kwargs={} | 574 return self.db_core_iface.messageEncryptionStop(to_jid, profile_key, timeout=const_TIMEOUT, reply_handler=callback, error_handler=error_handler) |
580 if callback is not None: | |
581 kwargs['timeout'] = const_TIMEOUT | |
582 kwargs['reply_handler'] = callback | |
583 kwargs['error_handler'] = error_handler | |
584 return self.db_core_iface.messageEncryptionStop(to_jid, profile_key, **kwargs) | |
585 | 575 |
586 def messageSend(self, to_jid, message, subject={}, mess_type="auto", extra={}, profile_key="@NONE@", callback=None, errback=None): | 576 def messageSend(self, to_jid, message, subject={}, mess_type="auto", extra={}, profile_key="@NONE@", callback=None, errback=None): |
587 if callback is None: | 577 if callback is None: |
588 error_handler = None | 578 error_handler = None |
589 else: | 579 else: |