Merge pull request #1773 from mattermost/release-1.9
Release 1.9 into master
This commit is contained in:
commit
2fce31beb7
10 changed files with 42 additions and 18 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
<React.Fragment key={postType + actorId}>
|
||||
{this.renderSystemMessage(postType, userIds, actorId, {activityType: style.activityType, link: linkStyle, text: style.text})}
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
{messageData.map(({postType, userIds, actorId}) => {
|
||||
return (
|
||||
<React.Fragment key={postType + actorId}>
|
||||
{this.renderSystemMessage(postType, userIds, actorId, {activityType: style.activityType, link: linkStyle, text: style.text})}
|
||||
</React.Fragment>
|
||||
);
|
||||
})}
|
||||
{content}
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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'},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>109</string>
|
||||
<string>110</string>
|
||||
<key>ITSAppUsesNonExemptEncryption</key>
|
||||
<false/>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.9.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>109</string>
|
||||
<string>110</string>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
|
|
|
|||
|
|
@ -19,6 +19,6 @@
|
|||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>109</string>
|
||||
<string>110</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
|||
4
package-lock.json
generated
4
package-lock.json
generated
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in a new issue