diff options
author | Richard Maudsley <richard.maudsley@isode.com> | 2014-04-16 09:11:15 (GMT) |
---|---|---|
committer | Richard Maudsley <richard.maudsley@isode.com> | 2014-04-25 09:26:47 (GMT) |
commit | 4c29d43177cb49625f7c6e731c9618b175071141 (patch) | |
tree | b08f17551fd219b7ede17043162166f59fbbafbd /Swift/Controllers/Chat | |
parent | b42a5c5849813fe8db3bd3889378a53238cc36f7 (diff) | |
download | swift-4c29d43177cb49625f7c6e731c9618b175071141.zip swift-4c29d43177cb49625f7c6e731c9618b175071141.tar.bz2 |
Fix MUC invite being treated like impromptu MUC invite.
Change-Id: Iec52f9fabfdcfc3a83681a10d7e0d5f0de2b4ee2
Diffstat (limited to 'Swift/Controllers/Chat')
-rw-r--r-- | Swift/Controllers/Chat/AutoAcceptMUCInviteDecider.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Swift/Controllers/Chat/AutoAcceptMUCInviteDecider.h b/Swift/Controllers/Chat/AutoAcceptMUCInviteDecider.h index 0f85a8a..d6e069f 100644 --- a/Swift/Controllers/Chat/AutoAcceptMUCInviteDecider.h +++ b/Swift/Controllers/Chat/AutoAcceptMUCInviteDecider.h @@ -4,6 +4,12 @@ * See Documentation/Licenses/BSD-simplified.txt for more information. */ +/* + * Copyright (c) 2014 Kevin Smith and Remko Tronçon + * Licensed under the GNU General Public License v3. + * See Documentation/Licenses/GPLv3.txt for more information. + */ + #pragma once #include <Swiften/Roster/XMPPRoster.h> @@ -18,8 +24,12 @@ namespace Swift { } bool isAutoAcceptedInvite(const JID& from, MUCInvitationPayload::ref invite) { - if (!invite->getIsImpromptu() && !invite->getIsContinuation()) { - return false; + if (!invite->getIsImpromptu()) { + return false; /* always ask the user for normal MUC invites */ + } + + if (invite->getIsContinuation()) { + return true; } std::string auto_accept_mode = settings_->getSetting(SettingConstants::INVITE_AUTO_ACCEPT_MODE); |