summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Maudsley <richard.maudsley@isode.com>2014-06-20 09:54:54 (GMT)
committerRichard Maudsley <richard.maudsley@isode.com>2014-06-20 09:55:41 (GMT)
commitf91647cf9a0df0366342fae2cbcfe9df376379ba (patch)
tree54deb2ae99023cbd513a3fc70f92430de9332380
parent0d5c2da5c9d2491db90a65766b0224cd47a0f953 (diff)
downloadswift-f91647cf9a0df0366342fae2cbcfe9df376379ba.zip
swift-f91647cf9a0df0366342fae2cbcfe9df376379ba.tar.bz2
Revert "Fix avatar not being updated when cleared"
This reverts commit be915da04068a412dd63a597192ec3232ad4e1c2. Change-Id: Ibcfa97f3438c03fae850cdeb1855c61180a3d372
-rw-r--r--Swift/Controllers/Storages/VCardFileStorage.cpp2
1 files changed, 1 insertions, 1 deletions
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<PhotoHashMap::iterator, bool> r = photoHashes.insert(std::make_pair(jid, hash));