Skip to content

Commit

Permalink
Merge pull request #7820 from element-hq/mauroromito/authenticated_media
Browse files Browse the repository at this point in the history
  • Loading branch information
Velin92 authored Jul 8, 2024
2 parents 515cfde + 17d4d68 commit bc69a31
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,16 @@ - (void)render:(id<MXKDirectoryServerCellDataStoring>)cellData
{
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
Expand Down

0 comments on commit bc69a31

Please sign in to comment.