Skip to content

Commit c9d95d1

Browse files
KenChoiKenChoi
authored andcommitted
Merge branch 'dev' of github.com:jpush/jmessage-react-plugin into dev
2 parents 34b119c + 4afc111 commit c9d95d1

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

example/ios/JMessageDemo/AppDelegate.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
1818
{
1919
NSURL *jsCodeLocation;
2020

21-
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
22-
// jsCodeLocation = [NSURL URLWithString:@"http://192.168.9.113:8081/index.ios.bundle?platform=ios&dev=true"];
21+
// jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
22+
jsCodeLocation = [NSURL URLWithString:@"http://192.168.10.155:8081/index.ios.bundle?platform=ios&dev=true"];
2323
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
2424
moduleName:@"ReactJChat"
2525
initialProperties:nil

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) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jmessage-react-plugin",
3-
"version": "2.1.9",
3+
"version": "2.2.0",
44
"description": "a jmessage plugin for react native application",
55
"main": "index.js",
66
"repository": {

0 commit comments

Comments
 (0)