diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-09-12 18:29:39 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-09-13 19:19:52 (GMT) |
commit | ef1052bbdb315aaa1c6254098ea05638d9a25b2f (patch) | |
tree | 482277f649f6c0fc00027514ea8986861fe33437 /Swiften/Avatars/AvatarManagerImpl.cpp | |
parent | 3ae8cccfe9c6bfed5dda5f024a5cb046ccfc9793 (diff) | |
download | swift-contrib-ef1052bbdb315aaa1c6254098ea05638d9a25b2f.zip swift-contrib-ef1052bbdb315aaa1c6254098ea05638d9a25b2f.tar.bz2 |
Added presence notifier.
Diffstat (limited to 'Swiften/Avatars/AvatarManagerImpl.cpp')
-rw-r--r-- | Swiften/Avatars/AvatarManagerImpl.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Swiften/Avatars/AvatarManagerImpl.cpp b/Swiften/Avatars/AvatarManagerImpl.cpp index 384994b..9813aed 100644 --- a/Swiften/Avatars/AvatarManagerImpl.cpp +++ b/Swiften/Avatars/AvatarManagerImpl.cpp @@ -11,6 +11,7 @@ #include "Swiften/Avatars/VCardUpdateAvatarManager.h" #include "Swiften/Avatars/VCardAvatarManager.h" #include "Swiften/Avatars/AvatarStorage.h" +#include "Swiften/Base/ByteArray.h" namespace Swift { @@ -39,5 +40,12 @@ boost::filesystem::path AvatarManagerImpl::getAvatarPath(const JID& jid) const { return boost::filesystem::path(); } +ByteArray AvatarManagerImpl::getAvatar(const JID& jid) const { + String hash = combinedAvatarProvider.getAvatarHash(jid); + if (!hash.isEmpty()) { + return avatarStorage->getAvatar(hash); + } + return ByteArray(); +} } |