diff --git a/android/app/build.gradle b/android/app/build.gradle
index a8f42c0db..7ed78953f 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -113,7 +113,7 @@ android {
applicationId "com.mattermost.rnbeta"
minSdkVersion 21
targetSdkVersion 23
- versionCode 109
+ versionCode 110
versionName "1.9.0"
ndk {
abiFilters "armeabi-v7a", "x86"
diff --git a/app/components/combined_system_message/combined_system_message.js b/app/components/combined_system_message/combined_system_message.js
index 00afca6be..d904ae19e 100644
--- a/app/components/combined_system_message/combined_system_message.js
+++ b/app/components/combined_system_message/combined_system_message.js
@@ -165,6 +165,7 @@ export default class CombinedSystemMessage extends React.PureComponent {
currentUsername: PropTypes.string.isRequired,
linkStyle: CustomPropTypes.Style,
messageData: PropTypes.array.isRequired,
+ showJoinLeave: PropTypes.bool.isRequired,
teammateNameDisplay: PropTypes.string.isRequired,
theme: PropTypes.object.isRequired,
};
@@ -357,15 +358,36 @@ export default class CombinedSystemMessage extends React.PureComponent {
} = this.props;
const style = getStyleSheet(theme);
+ const content = [];
+ for (const message of messageData) {
+ const {
+ postType,
+ actorId,
+ } = message;
+ let userIds = message.userIds;
+
+ if (!this.props.showJoinLeave && actorId !== this.props.currentUserId) {
+ const affectsCurrentUser = userIds.indexOf(this.props.currentUserId) !== -1;
+
+ if (affectsCurrentUser) {
+ // Only show the message that the current user was added, etc
+ userIds = [this.props.currentUserId];
+ } else {
+ // Not something the current user did or was affected by
+ continue;
+ }
+ }
+
+ content.push(
+
+ {this.renderSystemMessage(postType, userIds, actorId, {activityType: style.activityType, link: linkStyle, text: style.text})}
+
+ );
+ }
+
return (
- {messageData.map(({postType, userIds, actorId}) => {
- return (
-
- {this.renderSystemMessage(postType, userIds, actorId, {activityType: style.activityType, link: linkStyle, text: style.text})}
-
- );
- })}
+ {content}
);
}
diff --git a/app/components/combined_system_message/combined_system_message.test.js b/app/components/combined_system_message/combined_system_message.test.js
index 496c7d493..fe043dbd8 100644
--- a/app/components/combined_system_message/combined_system_message.test.js
+++ b/app/components/combined_system_message/combined_system_message.test.js
@@ -28,6 +28,7 @@ describe('CombinedSystemMessage', () => {
messageData: [
{postType: Posts.POST_TYPES.ADD_TO_TEAM, userIds: ['user_id_1'], actorId: 'user_id_2'},
],
+ showJoinLeave: true,
teammateNameDisplay: 'username',
theme: {centerChannelColor: '#aaa'},
};
diff --git a/app/components/combined_system_message/index.js b/app/components/combined_system_message/index.js
index 61b48ad35..1c225c266 100644
--- a/app/components/combined_system_message/index.js
+++ b/app/components/combined_system_message/index.js
@@ -5,8 +5,8 @@ import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import {getProfilesByIds, getProfilesByUsernames} from 'mattermost-redux/actions/users';
-
-import {getTeammateNameDisplaySetting} from 'mattermost-redux/selectors/entities/preferences';
+import {Preferences} from 'mattermost-redux/constants';
+import {getBool, getTeammateNameDisplaySetting} from 'mattermost-redux/selectors/entities/preferences';
import {getCurrentUser} from 'mattermost-redux/selectors/entities/users';
import CombinedSystemMessage from './combined_system_message';
@@ -16,6 +16,7 @@ function mapStateToProps(state) {
return {
currentUserId: currentUser.id,
currentUsername: currentUser.username,
+ showJoinLeave: getBool(state, Preferences.CATEGORY_ADVANCED_SETTINGS, Preferences.ADVANCED_FILTER_JOIN_LEAVE, true),
teammateNameDisplay: getTeammateNameDisplaySetting(state),
};
}
diff --git a/ios/Mattermost.xcodeproj/project.pbxproj b/ios/Mattermost.xcodeproj/project.pbxproj
index b02e5e82d..adeec692e 100644
--- a/ios/Mattermost.xcodeproj/project.pbxproj
+++ b/ios/Mattermost.xcodeproj/project.pbxproj
@@ -2516,7 +2516,7 @@
CODE_SIGN_ENTITLEMENTS = Mattermost/Mattermost.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- CURRENT_PROJECT_VERSION = 109;
+ CURRENT_PROJECT_VERSION = 110;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = UQ8HT4Q2XM;
ENABLE_BITCODE = NO;
@@ -2566,7 +2566,7 @@
CODE_SIGN_ENTITLEMENTS = Mattermost/Mattermost.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- CURRENT_PROJECT_VERSION = 109;
+ CURRENT_PROJECT_VERSION = 110;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = UQ8HT4Q2XM;
ENABLE_BITCODE = NO;
diff --git a/ios/Mattermost/Info.plist b/ios/Mattermost/Info.plist
index 99eeca9d4..c9046cfe6 100644
--- a/ios/Mattermost/Info.plist
+++ b/ios/Mattermost/Info.plist
@@ -34,7 +34,7 @@
CFBundleVersion
- 109
+ 110
ITSAppUsesNonExemptEncryption
LSRequiresIPhoneOS
diff --git a/ios/MattermostShare/Info.plist b/ios/MattermostShare/Info.plist
index 93af6f594..9d67310f1 100644
--- a/ios/MattermostShare/Info.plist
+++ b/ios/MattermostShare/Info.plist
@@ -23,7 +23,7 @@
CFBundleShortVersionString
1.9.0
CFBundleVersion
- 109
+ 110
NSAppTransportSecurity
NSAllowsArbitraryLoads
diff --git a/ios/MattermostTests/Info.plist b/ios/MattermostTests/Info.plist
index 12bcc1775..1a231c9ee 100644
--- a/ios/MattermostTests/Info.plist
+++ b/ios/MattermostTests/Info.plist
@@ -19,6 +19,6 @@
CFBundleSignature
????
CFBundleVersion
- 109
+ 110
diff --git a/package-lock.json b/package-lock.json
index a947184eb..3abc5f6f7 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -9878,8 +9878,8 @@
}
},
"mattermost-redux": {
- "version": "github:mattermost/mattermost-redux#b81b6c647b226554cb0d410578562e5f876f4d9b",
- "from": "github:mattermost/mattermost-redux#b81b6c647b226554cb0d410578562e5f876f4d9b",
+ "version": "github:mattermost/mattermost-redux#85edf0d1cae3b786d9be1946f19a23603af18417",
+ "from": "github:mattermost/mattermost-redux#85edf0d1cae3b786d9be1946f19a23603af18417",
"requires": {
"deep-equal": "1.0.1",
"eslint-plugin-header": "1.2.0",
diff --git a/package.json b/package.json
index b28577986..835fb3bac 100644
--- a/package.json
+++ b/package.json
@@ -15,7 +15,7 @@
"intl": "1.2.5",
"jail-monkey": "1.0.0",
"jsc-android": "216113.0.3",
- "mattermost-redux": "github:mattermost/mattermost-redux#b81b6c647b226554cb0d410578562e5f876f4d9b",
+ "mattermost-redux": "github:mattermost/mattermost-redux#85edf0d1cae3b786d9be1946f19a23603af18417",
"mime-db": "1.33.0",
"prop-types": "15.6.1",
"react": "16.3.2",