diff options
author | Tobias Markmann <tm@ayena.de> | 2016-02-15 16:34:10 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2016-02-15 16:34:24 (GMT) |
commit | 21c5075cdeec10cb5334167a5687ee533fea23b1 (patch) | |
tree | 8b1f0e03ca1a7e57e5bc05e0f325a9ef5687b81b | |
parent | 36c70097b1a42af84f9d6bf48a0c6196c560cbe0 (diff) | |
download | swift-swift-3.0rc3.zip swift-swift-3.0rc3.tar.bz2 |
Disable file-transfers to MUC PM contactsswift-3.0rc3
Currently the file-transfers to MUC PM contacts fail because
the from JID does not match the initiator JID. The
initiator JID is always the real client JID at the moment.
Disabling file-transfer for MUC PM contacts provides a better
UX for now.
Test-Information:
Tested file-transfer to normal contacts still works. Tested
file-transfers to MUC PMs do not start.
Change-Id: If5f59eb313a25ca919393f497a57fd339eb17e3e
-rw-r--r-- | Swift/Controllers/Chat/ChatController.cpp | 2 | ||||
-rw-r--r-- | Swift/QtUI/QtChatWindow.cpp | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/Swift/Controllers/Chat/ChatController.cpp b/Swift/Controllers/Chat/ChatController.cpp index 6e540eb..a80eee5 100644 --- a/Swift/Controllers/Chat/ChatController.cpp +++ b/Swift/Controllers/Chat/ChatController.cpp @@ -128,7 +128,7 @@ void ChatController::handleBareJIDCapsChanged(const JID& /*jid*/) { FeatureOracle featureOracle(entityCapsProvider_, presenceOracle_); chatWindow_->setCorrectionEnabled(featureOracle.isMessageCorrectionSupported(toJID_)); - chatWindow_->setFileTransferEnabled(featureOracle.isFileTransferSupported(toJID_)); + chatWindow_->setFileTransferEnabled(isInMUC_ ? No : featureOracle.isFileTransferSupported(toJID_)); contactSupportsReceipts_ = featureOracle.isMessageReceiptsSupported(toJID_); checkForDisplayingDisplayReceiptsAlert(); diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp index caa556f..a9bc2b5 100644 --- a/Swift/QtUI/QtChatWindow.cpp +++ b/Swift/QtUI/QtChatWindow.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2015 Isode Limited. + * Copyright (c) 2010-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ @@ -74,9 +74,7 @@ QtChatWindow::QtChatWindow(const QString& contact, QtChatTheme* theme, UIEventSt fileTransferEnabled_ = Maybe; updateTitleWithUnreadCount(); assert(settings); -#ifdef SWIFT_EXPERIMENTAL_FT setAcceptDrops(true); -#endif alertStyleSheet_ = "background: rgb(255, 255, 153); color: black"; @@ -590,8 +588,7 @@ void QtChatWindow::moveEvent(QMoveEvent*) { void QtChatWindow::dragEnterEvent(QDragEnterEvent *event) { if (isOnline_ && (blockingState_ != IsBlocked)) { if (event->mimeData()->hasUrls() && event->mimeData()->urls().size() == 1) { - // TODO: check whether contact actually supports file transfer - if (!isMUC_) { + if (!isMUC_ && fileTransferEnabled_ == Yes) { event->acceptProposedAction(); } } |