Skip to content

Commit 2850a4c

Browse files
committed
fix chatroom create and send message bug
1 parent c16b437 commit 2850a4c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ios/RCTJMessageModule/RCTJMessageModule.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1961,6 +1961,11 @@ - (JMSGOptionalContent *)convertDicToJMSGOptionalContent:(NSDictionary *)dic {
19611961

19621962
JMSGMessage *message = [conversation messageWithMessageId: param[@"id"]];
19631963

1964+
if (!message) {
1965+
failCallback(@[[self getErrorWithLog:@"cann't find the message from this id"]]);
1966+
return;
1967+
}
1968+
19641969
if ([message.content isKindOfClass:[JMSGMediaAbstractContent class]]) {
19651970
JMSGMediaAbstractContent *content = (JMSGMediaAbstractContent *)message.content;
19661971
content.uploadHandler = ^(float percent, NSString *msgID) {

0 commit comments

Comments
 (0)