summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-09-17 09:27:02 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-09-17 09:27:02 (GMT)
commit4b6a520ff560cdb16140d4cd3c25660b3d76227a (patch)
tree0a11a00e1d23178af7b12e4ea41a073ed8743788 /Swift/Controllers
parent26d2766be47b8c5643dd7e922a0d16576e810dae (diff)
downloadswift-4b6a520ff560cdb16140d4cd3c25660b3d76227a.zip
swift-4b6a520ff560cdb16140d4cd3c25660b3d76227a.tar.bz2
Fixed VCard request being sent too early.
Cause is NickResolver being instantiated earlier due to a recent refactoring.
Diffstat (limited to 'Swift/Controllers')
-rw-r--r--Swift/Controllers/NickResolver.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Swift/Controllers/NickResolver.cpp b/Swift/Controllers/NickResolver.cpp
index 5029b7d..2cc6562 100644
--- a/Swift/Controllers/NickResolver.cpp
+++ b/Swift/Controllers/NickResolver.cpp
@@ -13,6 +13,10 @@
#include "Swiften/Roster/XMPPRoster.h"
#include "Swiften/VCards/VCardManager.h"
+// FIXME: The NickResolver currently relies on the vcard being requested by the client on login.
+// The VCardManager should get an onConnected() signal (which is signalled when the stanzachannel is available(, and each time this is emitted,
+// the nickresolver should request the vcard.
+
namespace Swift {
NickResolver::NickResolver(const JID& ownJID, XMPPRoster* xmppRoster, VCardManager* vcardManager, MUCRegistry* mucRegistry) : ownJID_(ownJID) {
@@ -20,8 +24,6 @@ NickResolver::NickResolver(const JID& ownJID, XMPPRoster* xmppRoster, VCardManag
vcardManager_ = vcardManager;
if (vcardManager_) {
vcardManager_->onVCardChanged.connect(boost::bind(&NickResolver::handleVCardReceived, this, _1, _2));
- VCard::ref ownVCard = vcardManager_->getVCardAndRequestWhenNeeded(ownJID_);
- handleVCardReceived(ownJID_, ownVCard);
}
mucRegistry_ = mucRegistry;
}