From b5fc545c5f19d35c877514b30ba07303d0c9793d Mon Sep 17 00:00:00 2001
From: Tobias Markmann <tm@ayena.de>
Date: Thu, 21 Apr 2016 19:17:48 +0200
Subject: Allow to invite multiple contacts to a chat room at once

There was a bug that prevented to drag multiple contacts
in the invite dialog list. The restriction for impromptu
conversation rooms is now only applied if no local MUC service
is found and the dialog is a 'Chat to Users' dialog.

Test-Information:

Tested that you can now drag multiple contacts into the
invite dialog.

Tested on OS X 10.11.4 with Qt 5.4.2.

Change-Id: I50b0bb191570f32cfa054e415c993b1fb57073ad

diff --git a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
index 434da38..e00582c 100644
--- a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
+++ b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
@@ -15,8 +15,6 @@
 #include <QMovie>
 #include <QWizardPage>
 
-#include <Swiften/Base/Log.h>
-
 #include <Swift/Controllers/UIEvents/AddContactUIEvent.h>
 #include <Swift/Controllers/UIEvents/CreateImpromptuMUCUIEvent.h>
 #include <Swift/Controllers/UIEvents/InviteToMUCUIEvent.h>
@@ -433,7 +431,7 @@ void QtUserSearchWindow::addContacts(const std::vector<Contact::ref>& contacts)
                 contactVector_.push_back(newContact);
             }
         }
-        if (!supportsImpromptu_ && contactVector_.size() > 1) {
+        if (type_ != InviteToChat && !supportsImpromptu_ && contactVector_.size() > 1) {
             contactVector_.resize(1); /* can't chat with more than one user */
         }
         firstMultiJIDPage_->contactList_->setList(contactVector_);
-- 
cgit v0.10.2-6-g49f6