Mercurial > libervia-desktop-kivy
comparison cagou/plugins/plugin_wid_chat.py @ 281:ef77423ce500
core: store tls_validation flag in host and use if for file upload.
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 25 Mar 2019 07:11:09 +0100 |
parents | 444ba439530f |
children | 1b835bcfa663 |
comparison
equal
deleted
inserted
replaced
280:b0461363bc65 | 281:ef77423ce500 |
---|---|
625 if transfer_type == C.TRANSFER_UPLOAD: | 625 if transfer_type == C.TRANSFER_UPLOAD: |
626 G.host.bridge.fileUpload( | 626 G.host.bridge.fileUpload( |
627 file_path, | 627 file_path, |
628 "", | 628 "", |
629 "", | 629 "", |
630 {"ignore_tls_errors": C.BOOL_TRUE}, # FIXME: should not be the default | 630 {"ignore_tls_errors": C.boolConst(not G.host.tls_validation)}, |
631 self.profile, | 631 self.profile, |
632 callback = partial( | 632 callback = partial( |
633 G.host.actionManager, | 633 G.host.actionManager, |
634 progress_cb = partial(self.fileTransferCb, cleaning_cb=cleaning_cb), | 634 progress_cb = partial(self.fileTransferCb, cleaning_cb=cleaning_cb), |
635 progress_eb = partial(self.fileTransferEb, cleaning_cb=cleaning_cb), ) | 635 progress_eb = partial(self.fileTransferEb, cleaning_cb=cleaning_cb), |
636 ) | |
636 ) | 637 ) |
637 elif transfer_type == C.TRANSFER_SEND: | 638 elif transfer_type == C.TRANSFER_SEND: |
638 if self.type == C.CHAT_GROUP: | 639 if self.type == C.CHAT_GROUP: |
639 log.warning(u"P2P transfer is not possible for group chat") | 640 log.warning(u"P2P transfer is not possible for group chat") |
640 # TODO: show an error dialog to user, or better hide the send button for | 641 # TODO: show an error dialog to user, or better hide the send button for |