From 7423e7d3bffe44fa73803f1e06cb9db58f18ce13 Mon Sep 17 00:00:00 2001 From: Martin Kraft Date: Mon, 25 Mar 2019 20:37:54 -0400 Subject: [PATCH] MM-14345: Changes the channelIsReadOnly prop to be associated to the post's channel rather than the current channel. Show the unpin regardless of whether a channel is read-only. (#2656) --- app/components/post/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/components/post/index.js b/app/components/post/index.js index 9e57806ed..34071da34 100644 --- a/app/components/post/index.js +++ b/app/components/post/index.js @@ -6,7 +6,7 @@ import {bindActionCreators} from 'redux'; import {createPost, removePost} from 'mattermost-redux/actions/posts'; import {Posts} from 'mattermost-redux/constants'; -import {isCurrentChannelReadOnly} from 'mattermost-redux/selectors/entities/channels'; +import {isChannelReadOnlyById} from 'mattermost-redux/selectors/entities/channels'; import {getPost, makeGetCommentCountForPost, makeIsPostCommentMention} from 'mattermost-redux/selectors/entities/posts'; import {getCurrentUserId} from 'mattermost-redux/selectors/entities/users'; import {getMyPreferences, getTheme} from 'mattermost-redux/selectors/entities/preferences'; @@ -71,7 +71,7 @@ function makeMapStateToProps() { } return { - channelIsReadOnly: isCurrentChannelReadOnly(state), + channelIsReadOnly: isChannelReadOnlyById(state, post.channel_id), currentUserId, post, isFirstReply,