diff --git a/Classes/ChatConversationView.m b/Classes/ChatConversationView.m index 38e239576..92d33d69d 100644 --- a/Classes/ChatConversationView.m +++ b/Classes/ChatConversationView.m @@ -260,7 +260,8 @@ static UICompositeViewDescription *compositeDescription = nil; [_messageField setText:dict[@"message"]]; NSString *key = [[fileName componentsSeparatedByString:@"."] firstObject]; NSMutableDictionary * assetDict = [LinphoneUtils photoAssetsDictionary]; - if ([fileName hasSuffix:@"JPG"] || [fileName hasSuffix:@"PNG"]) { + + if ([fileName hasSuffix:@"JPG"] || [fileName hasSuffix:@"PNG"] || [fileName hasSuffix:@"jpg"] || [fileName hasSuffix:@"png"]) { PHAsset *phasset = [assetDict objectForKey:key]; if (!phasset) { // for the images not really in the photo album @@ -269,7 +270,7 @@ static UICompositeViewDescription *compositeDescription = nil; UIImage *image = [[UIImage alloc] initWithData:dict[@"nsData"]]; [self chooseImageQuality:image assetId:[phasset localIdentifier]]; } - } else if ([fileName hasSuffix:@"MOV"]) { + } else if ([fileName hasSuffix:@"MOV"] || [fileName hasSuffix:@"mov"]) { [self confirmShare:dict[@"nsData"] url:nil fileName:nil assetId:[[assetDict objectForKey:key] localIdentifier]]; } else { LOGE(@"Unable to parse file %@",fileName); diff --git a/Classes/LinphoneUI/UIChatBubblePhotoCell.m b/Classes/LinphoneUI/UIChatBubblePhotoCell.m index 5125dc7f7..e33294a79 100644 --- a/Classes/LinphoneUI/UIChatBubblePhotoCell.m +++ b/Classes/LinphoneUI/UIChatBubblePhotoCell.m @@ -192,7 +192,7 @@ static const CGFloat CELL_IMAGE_X_MARGIN = 100; } } else if (localFile) { - if ([localFile hasSuffix:@"JPG"] || [localFile hasSuffix:@"PNG"]) { + if ([localFile hasSuffix:@"JPG"] || [localFile hasSuffix:@"PNG"] || [localFile hasSuffix:@"jpg"] || [localFile hasSuffix:@"png"]) { NSData *data = [NSData dataWithContentsOfURL:[VIEW(ChatConversationView) getICloudFileUrl:localFile]]; UIImage *image = [[UIImage alloc] initWithData:data]; [self loadImageAsset:nil image:image]; @@ -314,7 +314,7 @@ static const CGFloat CELL_IMAGE_X_MARGIN = 100; PHAsset *asset = [_messageImageView asset]; if (!asset) { NSString *localFile = [LinphoneManager getMessageAppDataForKey:@"localfile" inMessage:self.message]; - if ([localFile hasSuffix:@"JPG"] || [localFile hasSuffix:@"PNG"]) { + if ([localFile hasSuffix:@"JPG"] || [localFile hasSuffix:@"PNG"] || [localFile hasSuffix:@"jpg"] || [localFile hasSuffix:@"png"]) { NSData *data = [NSData dataWithContentsOfURL:[VIEW(ChatConversationView) getICloudFileUrl:localFile]]; UIImage *image = [[UIImage alloc] initWithData:data]; if (image) diff --git a/Classes/LinphoneUI/UIChatBubbleTextCell.m b/Classes/LinphoneUI/UIChatBubbleTextCell.m index 41dff38a5..4b28a64cd 100644 --- a/Classes/LinphoneUI/UIChatBubbleTextCell.m +++ b/Classes/LinphoneUI/UIChatBubbleTextCell.m @@ -465,7 +465,7 @@ static const CGFloat CELL_IMAGE_X_MARGIN = 100; } if(localFile) { - if ([localFile hasSuffix:@"JPG"] || [localFile hasSuffix:@"PNG"]) { + if ([localFile hasSuffix:@"JPG"] || [localFile hasSuffix:@"PNG"] || [localFile hasSuffix:@"jpg"] || [localFile hasSuffix:@"png"]) { NSData *data = [NSData dataWithContentsOfURL:[VIEW(ChatConversationView) getICloudFileUrl:localFile]]; UIImage *image = [[UIImage alloc] initWithData:data]; size = [self getMediaMessageSizefromOriginalSize:image.size withWidth:width];