summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Avatars/VCardAvatarManager.cpp')
-rw-r--r--Swiften/Avatars/VCardAvatarManager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Swiften/Avatars/VCardAvatarManager.cpp b/Swiften/Avatars/VCardAvatarManager.cpp
index 8212a6e..539b7a0 100644
--- a/Swiften/Avatars/VCardAvatarManager.cpp
+++ b/Swiften/Avatars/VCardAvatarManager.cpp
@@ -23,19 +23,19 @@ VCardAvatarManager::VCardAvatarManager(VCardManager* vcardManager, AvatarStorage
}
void VCardAvatarManager::handleVCardChanged(const JID& from) {
// We don't check whether the avatar actually changed. Direct use of this
// manager could cause unnecessary updates, but in practice, this will be
// caught by the wrapping CombinedAvatarManager anyway.
onAvatarChanged(from);
}
-std::string VCardAvatarManager::getAvatarHash(const JID& jid) const {
+boost::optional<std::string> VCardAvatarManager::getAvatarHash(const JID& jid) const {
JID avatarJID = getAvatarJID(jid);
std::string hash = vcardManager_->getPhotoHash(avatarJID);
if (!hash.empty()) {
if (!avatarStorage_->hasAvatar(hash)) {
VCard::ref vCard = vcardManager_->getVCard(avatarJID);
if (vCard) {
std::string newHash = Hexify::hexify(crypto_->getSHA1Hash(vCard->getPhoto()));
if (newHash != hash) {
// Shouldn't happen, but sometimes seem to. Might be fixed if we