File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -208,7 +208,8 @@ - (JMSGMessage *)createMessageWithDictionary:(NSDictionary *)param type:(JMSGCon
208208 return nil ;
209209 }
210210 content = [[JMSGImageContent alloc ] initWithImageData: [NSData dataWithContentsOfFile: mediaPath]];
211-
211+ JMSGImageContent *imgContent = content;
212+ imgContent.format = [mediaPath pathExtension ];
212213 break ;
213214 }
214215 case kJMSGContentTypeVoice :{
@@ -251,6 +252,8 @@ - (JMSGMessage *)createMessageWithDictionary:(NSDictionary *)param type:(JMSGCon
251252 }
252253
253254 content = [[JMSGFileContent alloc ] initWithFileData: [NSData dataWithContentsOfFile: mediaPath] fileName: fileName];
255+ JMSGFileContent *fileContent = content;
256+ fileContent.format =[mediaPath pathExtension ];
254257 break ;
255258 }
256259 case kJMSGContentTypeCustom :{
You can’t perform that action at this time.
0 commit comments