summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Avatars/AvatarManagerImpl.cpp')
-rw-r--r--Swiften/Avatars/AvatarManagerImpl.cpp8
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();
+}
}