diff --git a/android/app/build.gradle b/android/app/build.gradle
index 2f8ebd76d4a..3417962cd0e 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -106,8 +106,8 @@ android {
applicationId "com.mattermost.rnbeta"
minSdkVersion 21
targetSdkVersion 23
- versionCode 77
- versionName "1.5.2"
+ versionCode 83
+ versionName "1.5.3"
multiDexEnabled true
ndk {
abiFilters "armeabi-v7a", "x86"
diff --git a/app/actions/views/login.js b/app/actions/views/login.js
index 513507d64c9..eb69aa0e6e1 100644
--- a/app/actions/views/login.js
+++ b/app/actions/views/login.js
@@ -1,5 +1,7 @@
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
+
+import {getDataRetentionPolicy} from 'mattermost-redux/actions/general';
import {GeneralTypes} from 'mattermost-redux/action_types';
import {Client, Client4} from 'mattermost-redux/client';
@@ -25,8 +27,10 @@ export function handlePasswordChanged(password) {
export function handleSuccessfulLogin() {
return async (dispatch, getState) => {
+ const {config, license} = getState().entities.general;
const token = Client4.getToken();
const url = Client4.getUrl();
+
dispatch({
type: GeneralTypes.RECEIVED_APP_CREDENTIALS,
data: {
@@ -38,6 +42,13 @@ export function handleSuccessfulLogin() {
Client.setToken(token);
Client.setUrl(url);
+ if (config.DataRetentionEnableMessageDeletion && config.DataRetentionEnableMessageDeletion === 'true' &&
+ license.IsLicensed === 'true' && license.DataRetention === 'true') {
+ getDataRetentionPolicy()(dispatch, getState);
+ } else {
+ dispatch({type: GeneralTypes.RECEIVED_DATA_RETENTION_POLICY, data: {}});
+ }
+
return true;
};
}
diff --git a/app/actions/views/root.js b/app/actions/views/root.js
index 43fbb0d2403..f27b7190c02 100644
--- a/app/actions/views/root.js
+++ b/app/actions/views/root.js
@@ -19,6 +19,7 @@ import {
export function loadConfigAndLicense() {
return async (dispatch, getState) => {
+ const {currentUserId} = getState().entities.users;
const [configData, licenseData] = await Promise.all([
getClientConfig()(dispatch, getState),
getLicenseConfig()(dispatch, getState)
@@ -27,11 +28,13 @@ export function loadConfigAndLicense() {
const config = configData.data || {};
const license = licenseData.data || {};
- if (config.DataRetentionEnableMessageDeletion && config.DataRetentionEnableMessageDeletion === 'true' &&
- license.IsLicensed === 'true' && license.DataRetention === 'true') {
- getDataRetentionPolicy()(dispatch, getState);
- } else {
- dispatch({type: GeneralTypes.RECEIVED_DATA_RETENTION_POLICY, data: {}});
+ if (currentUserId) {
+ if (config.DataRetentionEnableMessageDeletion && config.DataRetentionEnableMessageDeletion === 'true' &&
+ license.IsLicensed === 'true' && license.DataRetention === 'true') {
+ getDataRetentionPolicy()(dispatch, getState);
+ } else {
+ dispatch({type: GeneralTypes.RECEIVED_DATA_RETENTION_POLICY, data: {}});
+ }
}
return {config, license};
diff --git a/ios/Mattermost.xcodeproj/project.pbxproj b/ios/Mattermost.xcodeproj/project.pbxproj
index 9bbe8c50795..8923d321e5a 100644
--- a/ios/Mattermost.xcodeproj/project.pbxproj
+++ b/ios/Mattermost.xcodeproj/project.pbxproj
@@ -2156,7 +2156,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = Mattermost/Mattermost.entitlements;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- CURRENT_PROJECT_VERSION = 77;
+ CURRENT_PROJECT_VERSION = 83;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = UQ8HT4Q2XM;
ENABLE_BITCODE = NO;
@@ -2206,7 +2206,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = Mattermost/Mattermost.entitlements;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- CURRENT_PROJECT_VERSION = 77;
+ CURRENT_PROJECT_VERSION = 83;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = UQ8HT4Q2XM;
ENABLE_BITCODE = NO;
diff --git a/ios/Mattermost/Info.plist b/ios/Mattermost/Info.plist
index 249c0b52466..3921bb5cbec 100644
--- a/ios/Mattermost/Info.plist
+++ b/ios/Mattermost/Info.plist
@@ -17,7 +17,7 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 1.5.2
+ 1.5.3
CFBundleSignature
????
CFBundleURLTypes
@@ -32,7 +32,7 @@
CFBundleVersion
- 77
+ 83
ITSAppUsesNonExemptEncryption
LSRequiresIPhoneOS
diff --git a/ios/MattermostTests/Info.plist b/ios/MattermostTests/Info.plist
index e8144c8a185..46875036d5b 100644
--- a/ios/MattermostTests/Info.plist
+++ b/ios/MattermostTests/Info.plist
@@ -15,10 +15,10 @@
CFBundlePackageType
BNDL
CFBundleShortVersionString
- 1.5.2
+ 1.5.3
CFBundleSignature
????
CFBundleVersion
- 77
+ 83