mattermost-mobile/app/components/post_profile_picture/index.js
Jesse Hallam 58b72302d6 update eslint's comma-dangle rule to always-multiline (#1457)
* update eslint's `comma-dangle` rule to `always-multiline`

* add check and fix scripts to package.json

* Invoke `yarn fix` to adopt the updated eslint rules. No other changes are included.
2018-02-23 09:06:02 -05:00

27 lines
967 B
JavaScript

// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
import {connect} from 'react-redux';
import {getPost} from 'mattermost-redux/selectors/entities/posts';
import {isSystemMessage} from 'mattermost-redux/utils/post_utils';
import {getTheme} from 'mattermost-redux/selectors/entities/preferences';
import PostProfilePicture from './post_profile_picture';
function mapStateToProps(state, ownProps) {
const {config} = state.entities.general;
const post = getPost(state, ownProps.postId);
return {
enablePostIconOverride: config.EnablePostIconOverride === 'true',
fromWebHook: post.props && post.props.from_webhook === 'true',
isSystemMessage: isSystemMessage(post),
overrideIconUrl: post.props && post.props.override_icon_url,
userId: post.user_id,
theme: getTheme(state),
};
}
export default connect(mapStateToProps)(PostProfilePicture);