infobip-mobile-messaging-react-native-plugin 13.3.0 → 13.4.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.
@@ -87,7 +87,7 @@ repositories {
87
87
  }
88
88
 
89
89
  dependencies {
90
- def mmVersion = '13.18.0'
90
+ def mmVersion = '13.21.0'
91
91
  //react and mm dependencies clash
92
92
  if (!overrideKotlinVersion.empty) {
93
93
  constraints {
@@ -32,6 +32,7 @@ import org.infobip.mobile.messaging.chat.core.widget.LivechatWidgetLanguage;
32
32
  import org.infobip.mobile.messaging.mobileapi.MobileMessagingError;
33
33
  import org.infobip.mobile.messaging.mobileapi.Result;
34
34
  import org.infobip.mobile.messaging.util.StringUtils;
35
+ import org.infobip.mobile.messaging.chat.core.JwtProvider;
35
36
  import org.infobip.reactlibrary.mobilemessaging.datamappers.ReactNativeJson;
36
37
  import org.infobip.mobile.messaging.api.support.http.serialization.JsonSerializer;
37
38
  import org.infobip.mobile.messaging.chat.core.MultithreadStrategy;
@@ -50,7 +51,7 @@ public class RNMMChatModule extends ReactContextBaseJavaModule implements Activi
50
51
 
51
52
  private String jwt = null;
52
53
  private boolean isJwtProviderInitialInvocation = true;
53
- private final InAppChat.JwtProvider jwtProvider = () -> {
54
+ private final JwtProvider jwtProvider = () -> {
54
55
  if (!isJwtProviderInitialInvocation) {
55
56
  //send event to JS to generate new JWT and invoke native setter, then wait 150ms and return generated JWT
56
57
  ReactNativeEvent.send(EVENT_INAPPCHAT_JWT_REQUESTED, reactContext);
@@ -137,11 +138,11 @@ public class RNMMChatModule extends ReactContextBaseJavaModule implements Activi
137
138
  public void setJwt(String jwt) {
138
139
  this.jwt = jwt;
139
140
  InAppChat inAppChat = InAppChat.getInstance(reactContext);
140
- if (inAppChat.getJwtProvider() == null) {
141
- inAppChat.setJwtProvider(jwtProvider);
141
+ if (inAppChat.getWidgetJwtProvider() == null) {
142
+ inAppChat.setWidgetJwtProvider(jwtProvider);
142
143
  this.isJwtProviderInitialInvocation = true;
143
- } else if (inAppChat.getJwtProvider() != null && StringUtils.isBlank(jwt)) {
144
- inAppChat.setJwtProvider(null);
144
+ } else if (inAppChat.getWidgetJwtProvider() != null && StringUtils.isBlank(jwt)) {
145
+ inAppChat.setWidgetJwtProvider(null);
145
146
  }
146
147
  }
147
148
 
@@ -1,7 +1,7 @@
1
1
  require "json"
2
2
 
3
3
  package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4
- mmVersion = "13.5.0"
4
+ mmVersion = "13.6.1"
5
5
 
6
6
  Pod::Spec.new do |s|
7
7
  s.name = "infobip-mobile-messaging-react-native-plugin"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "infobip-mobile-messaging-react-native-plugin",
3
3
  "title": "Infobip Mobile Messaging React Native Plugin",
4
- "version": "13.3.0",
4
+ "version": "13.4.1",
5
5
  "description": "Infobip Mobile Messaging React Native Plugin",
6
6
  "main": "./src/index.js",
7
7
  "scripts": {