diff --git a/app/components/post_add_channel_member/post_add_channel_member.js b/app/components/post_add_channel_member/post_add_channel_member.js index b981e18c2..e279bfe66 100644 --- a/app/components/post_add_channel_member/post_add_channel_member.js +++ b/app/components/post_add_channel_member/post_add_channel_member.js @@ -13,6 +13,7 @@ import {concatStyles} from 'app/utils/theme'; import AtMention from 'app/components/at_mention'; import FormattedText from 'app/components/formatted_text'; +import CustomPropTypes from 'app/constants/custom_prop_types'; export default class PostAddChannelMember extends React.PureComponent { static propTypes = { @@ -21,6 +22,7 @@ export default class PostAddChannelMember extends React.PureComponent { removePost: PropTypes.func.isRequired, sendAddToChannelEphemeralPost: PropTypes.func.isRequired, }).isRequired, + baseTextStyle: CustomPropTypes.Style, currentUser: PropTypes.object.isRequired, channelType: PropTypes.string, post: PropTypes.object.isRequired, @@ -134,7 +136,8 @@ export default class PostAddChannelMember extends React.PureComponent { } render() { - const {channelType, postId, usernames} = this.props; + const {channelType, baseTextStyle, postId, usernames} = this.props; + if (!postId || !channelType) { return null; } @@ -168,6 +171,7 @@ export default class PostAddChannelMember extends React.PureComponent { ); } -} +} \ No newline at end of file diff --git a/app/components/post_body/post_body.js b/app/components/post_body/post_body.js index e479ef143..f2e6f1660 100644 --- a/app/components/post_body/post_body.js +++ b/app/components/post_body/post_body.js @@ -233,7 +233,7 @@ export default class PostBody extends PureComponent { } }; - renderAddChannelMember = (style, textStyles) => { + renderAddChannelMember = (style, messageStyle, textStyles) => { const {onPermalinkPress, onPress, postProps} = this.props; if (!PostAddChannelMember) { @@ -244,6 +244,7 @@ export default class PostBody extends PureComponent { {messageComponent}); } else if (isPostAddChannelMember) { - messageComponent = this.renderAddChannelMember(style, textStyles); + messageComponent = this.renderAddChannelMember(style, messageStyle, textStyles); } else if (postType === Posts.POST_TYPES.COMBINED_USER_ACTIVITY) { const {allUserIds, allUsernames, messageData} = postProps.user_activity; messageComponent = (