From f91647cf9a0df0366342fae2cbcfe9df376379ba Mon Sep 17 00:00:00 2001 From: Richard Maudsley Date: Fri, 20 Jun 2014 10:54:54 +0100 Subject: Revert "Fix avatar not being updated when cleared" This reverts commit be915da04068a412dd63a597192ec3232ad4e1c2. Change-Id: Ibcfa97f3438c03fae850cdeb1855c61180a3d372 diff --git a/Swift/Controllers/Storages/VCardFileStorage.cpp b/Swift/Controllers/Storages/VCardFileStorage.cpp index b101ecf..b22e235 100644 --- a/Swift/Controllers/Storages/VCardFileStorage.cpp +++ b/Swift/Controllers/Storages/VCardFileStorage.cpp @@ -88,7 +88,7 @@ std::string VCardFileStorage::getPhotoHash(const JID& jid) const { std::string VCardFileStorage::getAndUpdatePhotoHash(const JID& jid, VCard::ref vCard) const { std::string hash; - if (vCard) { + if (vCard && !vCard->getPhoto().empty()) { hash = Hexify::hexify(crypto->getSHA1Hash(vCard->getPhoto())); } std::pair r = photoHashes.insert(std::make_pair(jid, hash)); -- cgit v0.10.2-6-g49f6