diff --git a/app/components/autocomplete/at_mention/index.js b/app/components/autocomplete/at_mention/index.js
index d6efb75a0..f0766b5f7 100644
--- a/app/components/autocomplete/at_mention/index.js
+++ b/app/components/autocomplete/at_mention/index.js
@@ -22,7 +22,7 @@ function mapStateToProps(state, ownProps) {
const {cursorPosition, isSearch, rootId} = ownProps;
const currentChannelId = getCurrentChannelId(state);
- let postDraft;
+ let postDraft = '';
if (isSearch) {
postDraft = state.views.search;
} else if (ownProps.rootId) {
diff --git a/app/components/autocomplete/channel_mention/index.js b/app/components/autocomplete/channel_mention/index.js
index c2ade4959..23c5be00f 100644
--- a/app/components/autocomplete/channel_mention/index.js
+++ b/app/components/autocomplete/channel_mention/index.js
@@ -23,7 +23,7 @@ function mapStateToProps(state, ownProps) {
const {cursorPosition, isSearch, rootId} = ownProps;
const currentChannelId = getCurrentChannelId(state);
- let postDraft;
+ let postDraft = '';
if (isSearch) {
postDraft = state.views.search;
} else if (rootId) {
diff --git a/app/components/post_profile_picture/index.js b/app/components/post_profile_picture/index.js
index c92dc613e..4db425d98 100644
--- a/app/components/post_profile_picture/index.js
+++ b/app/components/post_profile_picture/index.js
@@ -4,7 +4,6 @@
import {connect} from 'react-redux';
import {getPost} from 'mattermost-redux/selectors/entities/posts';
-import {getUser} from 'mattermost-redux/selectors/entities/users';
import {isSystemMessage} from 'mattermost-redux/utils/post_utils';
import {getTheme} from 'app/selectors/preferences';
@@ -14,7 +13,6 @@ import PostProfilePicture from './post_profile_picture';
function mapStateToProps(state, ownProps) {
const {config} = state.entities.general;
const post = getPost(state, ownProps.postId);
- const user = getUser(state, post.user_id);
return {
...ownProps,
@@ -22,7 +20,7 @@ function mapStateToProps(state, ownProps) {
fromWebHook: post.props && post.props.from_webhook === 'true',
isSystemMessage: isSystemMessage(post),
overrideIconUrl: post.props && post.props.override_icon_url,
- user,
+ userId: post.user_id,
theme: getTheme(state)
};
}
diff --git a/app/components/post_profile_picture/post_profile_picture.js b/app/components/post_profile_picture/post_profile_picture.js
index 79a2e15a8..b58e74878 100644
--- a/app/components/post_profile_picture/post_profile_picture.js
+++ b/app/components/post_profile_picture/post_profile_picture.js
@@ -20,7 +20,7 @@ function PostProfilePicture(props) {
onViewUserProfile,
overrideIconUrl,
theme,
- user
+ userId
} = props;
if (isSystemMessage) {
return (
@@ -51,7 +51,7 @@ function PostProfilePicture(props) {
return (
);
@@ -60,7 +60,7 @@ function PostProfilePicture(props) {
return (
@@ -74,7 +74,7 @@ PostProfilePicture.propTypes = {
overrideIconUrl: PropTypes.string,
onViewUserProfile: PropTypes.func,
theme: PropTypes.object,
- user: PropTypes.object
+ userId: PropTypes.string
};
PostProfilePicture.defaultProps = {