aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-05-07 06:36:49 +0200
committerdec05eba <dec05eba@protonmail.com>2018-05-07 06:36:52 +0200
commit440b0540f57bb9410ee270eea4829365fbbbbf89 (patch)
treef23577a90ccb4185728d0a9c4dd396a35456fadf /src
parent9ebc3e3f5cf4847239d04cf5b3b01d0b1855a039 (diff)
Limit avatar size to 1mb
Diffstat (limited to 'src')
-rw-r--r--src/MessageBoard.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/MessageBoard.cpp b/src/MessageBoard.cpp
index 8572873..5e101aa 100644
--- a/src/MessageBoard.cpp
+++ b/src/MessageBoard.cpp
@@ -126,7 +126,8 @@ namespace dchat
}
}
- const ContentByUrlResult avatarResult = cache.getContentByUrl(message->user->avatarUrl);
+ // Max avatar size = 1mb
+ const ContentByUrlResult avatarResult = cache.getContentByUrl(message->user->avatarUrl, 1024 * 1024);
if(avatarResult.type == ContentByUrlResult::Type::CACHED)
{
sf::Shader *circleShader = ResourceCache::getShader("shaders/circleMask.glsl", sf::Shader::Fragment);