MM-14055: Load the channel even if not joining. (#2567)
This commit is contained in:
parent
5eac23ea8c
commit
70907d061c
1 changed files with 2 additions and 2 deletions
|
|
@ -311,9 +311,9 @@ export default class Permalink extends PureComponent {
|
|||
if (!channelId) {
|
||||
const focusedPost = post.data && post.data.posts ? post.data.posts[focusedPostId] : null;
|
||||
focusChannelId = focusedPost ? focusedPost.channel_id : '';
|
||||
if (focusChannelId && !this.props.myMembers[focusChannelId]) {
|
||||
if (focusChannelId) {
|
||||
const {data: channel} = await actions.getChannel(focusChannelId);
|
||||
if (channel && channel.type === General.OPEN_CHANNEL) {
|
||||
if (!this.props.myMembers[focusChannelId] && channel && channel.type === General.OPEN_CHANNEL) {
|
||||
await actions.joinChannel(currentUserId, channel.team_id, channel.id);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue