Merge pull request #7820 from element-hq/mauroromito/authenticated_media

This commit is contained in:
Mauro
2024-07-08 10:05:00 +02:00
committed by GitHub
2 changed files with 11 additions and 1 deletions

View File

@@ -60,6 +60,16 @@
{
iconURL = [NSString stringWithFormat:@"%@%@", kMXContentUriScheme, [iconURL substringFromIndex:range.location + range.length]];
}
// Check also if we are using the authenticated endpoint
else
{
mxMediaPrefix = [NSString stringWithFormat:@"/%@/download/", kMXAuthenticatedContentPrefixPath];
range = [iconURL rangeOfString:mxMediaPrefix];
if (range.location != NSNotFound)
{
iconURL = [NSString stringWithFormat:@"%@%@", kMXContentUriScheme, [iconURL substringFromIndex:range.location + range.length]];
}
}
[self.iconImageView setImageURI:iconURL
withType:nil
andImageOrientation:UIImageOrientationUp