cordova-plugin-ymchat 2.2.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/ios/ymchat.m +5 -1
package/package.json
CHANGED
package/src/ios/ymchat.m
CHANGED
|
@@ -95,7 +95,11 @@
|
|
|
95
95
|
|
|
96
96
|
- (void)onEventFromBotWithResponse:(YMBotEventResponse *)response {
|
|
97
97
|
CDVPluginResult* pluginResult = nil;
|
|
98
|
-
|
|
98
|
+
NSMutableDictionary *event = [[NSMutableDictionary alloc]initWithCapacity:10];
|
|
99
|
+
[event setObject:response.code forKey:@"code"];
|
|
100
|
+
if(response.data){
|
|
101
|
+
[event setObject:response.data forKey:@"data"];
|
|
102
|
+
}
|
|
99
103
|
pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:event];
|
|
100
104
|
[pluginResult setKeepCallbackAsBool:YES];
|
|
101
105
|
[self.commandDelegate sendPluginResult:pluginResult callbackId:onEvent.callbackId];
|