diff options
Diffstat (limited to 'Swiften/Avatars/VCardUpdateAvatarManager.cpp')
-rw-r--r-- | Swiften/Avatars/VCardUpdateAvatarManager.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Swiften/Avatars/VCardUpdateAvatarManager.cpp b/Swiften/Avatars/VCardUpdateAvatarManager.cpp index 80d7730..dbc0b9b 100644 --- a/Swiften/Avatars/VCardUpdateAvatarManager.cpp +++ b/Swiften/Avatars/VCardUpdateAvatarManager.cpp @@ -21,6 +21,7 @@ namespace Swift { VCardUpdateAvatarManager::VCardUpdateAvatarManager(VCardManager* vcardManager, StanzaChannel* stanzaChannel, AvatarStorage* avatarStorage, MUCRegistry* mucRegistry) : vcardManager_(vcardManager), stanzaChannel_(stanzaChannel), avatarStorage_(avatarStorage), mucRegistry_(mucRegistry) { stanzaChannel->onPresenceReceived.connect(boost::bind(&VCardUpdateAvatarManager::handlePresenceReceived, this, _1)); + stanzaChannel->onAvailableChanged.connect(boost::bind(&VCardUpdateAvatarManager::handleStanzaChannelAvailableChanged, this, _1)); vcardManager_->onVCardChanged.connect(boost::bind(&VCardUpdateAvatarManager::handleVCardChanged, this, _1, _2)); } @@ -92,5 +93,11 @@ JID VCardUpdateAvatarManager::getAvatarJID(const JID& jid) const { return (mucRegistry_ && mucRegistry_->isMUC(bareFrom)) ? jid : bareFrom; } +void VCardUpdateAvatarManager::handleStanzaChannelAvailableChanged(bool available) { + if (available) { + avatarHashes_.clear(); + } +} + } |