diff options
author | Kevin Smith <git@kismith.co.uk> | 2012-04-28 11:06:38 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2012-04-28 11:08:11 (GMT) |
commit | 534b7771cbfdee2fa60f6f154d578c3ef8cf2563 (patch) | |
tree | 21c09fa579ad4e9ef6cefdab98aee7e38a9f250e /Swift/Controllers/Chat/ChatControllerBase.cpp | |
parent | d6f10adb0a723022eb4e4b57cdfff8288145f407 (diff) | |
download | swift-contrib-534b7771cbfdee2fa60f6f154d578c3ef8cf2563.zip swift-contrib-534b7771cbfdee2fa60f6f154d578c3ef8cf2563.tar.bz2 |
Send label catalogue queries to bare/full JID as appropriate.
Resolves: #244
Diffstat (limited to 'Swift/Controllers/Chat/ChatControllerBase.cpp')
-rw-r--r-- | Swift/Controllers/Chat/ChatControllerBase.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Swift/Controllers/Chat/ChatControllerBase.cpp b/Swift/Controllers/Chat/ChatControllerBase.cpp index 3ff52a6..bc9c14e 100644 --- a/Swift/Controllers/Chat/ChatControllerBase.cpp +++ b/Swift/Controllers/Chat/ChatControllerBase.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2011 Kevin Smith + * Copyright (c) 2010-2012 Kevin Smith * Licensed under the GNU General Public License v3. * See Documentation/Licenses/GPLv3.txt for more information. */ @@ -84,9 +84,13 @@ void ChatControllerBase::setOnline(bool online) { setEnabled(online); } +JID ChatControllerBase::getBaseJID() { + return JID(toJID_.toBare()); +} + void ChatControllerBase::setAvailableServerFeatures(boost::shared_ptr<DiscoInfo> info) { if (iqRouter_->isAvailable() && info->hasFeature(DiscoInfo::SecurityLabelsCatalogFeature)) { - GetSecurityLabelsCatalogRequest::ref request = GetSecurityLabelsCatalogRequest::create(JID(toJID_.toBare()), iqRouter_); + GetSecurityLabelsCatalogRequest::ref request = GetSecurityLabelsCatalogRequest::create(getBaseJID(), iqRouter_); request->onResponse.connect(boost::bind(&ChatControllerBase::handleSecurityLabelsCatalogResponse, this, _1, _2)); request->send(); } else { |