cordova-plugin-ymchat 2.3.2 → 2.4.0

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cordova-plugin-ymchat",
3
- "version": "2.3.2",
3
+ "version": "2.4.0",
4
4
  "description": "Cordova plugin to integrate yellow.ai chatbot",
5
5
  "cordova": {
6
6
  "id": "cordova-plugin-ymchat",
package/plugin.xml CHANGED
@@ -1,5 +1,5 @@
1
1
  <?xml version='1.0' encoding='utf-8'?>
2
- <plugin id="cordova-plugin-ymchat" version="2.3.2"
2
+ <plugin id="cordova-plugin-ymchat" version="2.4.0"
3
3
  xmlns="http://apache.org/cordova/ns/plugins/1.0"
4
4
  xmlns:android="http://schemas.android.com/apk/res/android">
5
5
  <name>ymchat</name>
@@ -34,7 +34,7 @@
34
34
  <source url="https://github.com/CocoaPods/Specs.git" branch="master"/>
35
35
  </config>
36
36
  <pods use-frameworks="true">
37
- <pod name="YMChat" spec="~> 1.9" swift-version="5.0"/>
37
+ <pod name="YMChat" spec="~> 1.10" swift-version="5.0"/>
38
38
  </pods>
39
39
  </podspec>
40
40
  <config-file parent="/*" target="config.xml">
@@ -24,5 +24,5 @@ repositories {
24
24
  dependencies {
25
25
  implementation 'androidx.appcompat:appcompat:1.0.2'
26
26
  implementation 'androidx.annotation:annotation:1.0.2'
27
- implementation 'com.github.yellowmessenger:YMChatbot-Android:v2.3.+'
27
+ implementation 'com.github.yellowmessenger:YMChatbot-Android:v2.4.+'
28
28
  }
@@ -80,6 +80,9 @@ public class YmChatCordova extends CordovaPlugin {
80
80
  case "useLiteVersion":
81
81
  useLiteVersion(args, callbackContext);
82
82
  return true;
83
+ case "reloadBot":
84
+ reloadBot();
85
+ return true;
83
86
  }
84
87
  return false;
85
88
  }
@@ -147,6 +150,10 @@ public class YmChatCordova extends CordovaPlugin {
147
150
  ymChatService.closeBot();
148
151
  }
149
152
 
153
+ public void reloadBot() {
154
+ ymChatService.reloadBot();
155
+ }
156
+
150
157
  public void setDeviceToken(JSONArray args, CallbackContext callbackContext) {
151
158
  try {
152
159
  String deviceToken = args.getString(0);
@@ -49,6 +49,10 @@ public class YmChatService {
49
49
  ymChat.closeBot();
50
50
  }
51
51
 
52
+ public void reloadBot() {
53
+ ymChat.reloadBot();
54
+ }
55
+
52
56
  public void setDeviceToken(String token, CallbackContext callbackContext) {
53
57
  ymChat.config.deviceToken = token;
54
58
  }
package/src/ios/ymchat.m CHANGED
@@ -92,6 +92,10 @@
92
92
  [[YMChat shared] closeBot];
93
93
  }
94
94
 
95
+ - (void)reloadBot:(CDVInvokedUrlCommand*)command
96
+ {
97
+ [[YMChat shared] reloadBot];
98
+ }
95
99
 
96
100
  - (void)onEventFromBotWithResponse:(YMBotEventResponse *)response {
97
101
  CDVPluginResult* pluginResult = nil;
package/www/ymchat.js CHANGED
@@ -62,6 +62,9 @@ const YmChatAPI = {
62
62
  useLiteVersion: (shouldUseLiteVersion) => {
63
63
  exec(null, null, "ymchat", "useLiteVersion", [shouldUseLiteVersion]);
64
64
  },
65
+ reloadBot: () => {
66
+ exec(null, null, "ymchat", "reloadBot", []);
67
+ },
65
68
  };
66
69
 
67
70
  module.exports = YmChatAPI;