summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Avatars/AvatarFileStorage.cpp')
-rw-r--r--Swiften/Avatars/AvatarFileStorage.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/Swiften/Avatars/AvatarFileStorage.cpp b/Swiften/Avatars/AvatarFileStorage.cpp
index a0ebd21..57bb1be 100644
--- a/Swiften/Avatars/AvatarFileStorage.cpp
+++ b/Swiften/Avatars/AvatarFileStorage.cpp
@@ -34,4 +34,11 @@ boost::filesystem::path AvatarFileStorage::getAvatarPath(const String& hash) con
return path_ / hash.getUTF8String();
}
+ByteArray AvatarFileStorage::getAvatar(const String& hash) const {
+ ByteArray data;
+ data.readFromFile(getAvatarPath(hash).string());
+ return data;
+}
+
+
}