From f37c03a75f745f00d13b91140a9e6fb9a8d5799a Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Fri, 3 Mar 2017 12:26:53 -0500 Subject: [PATCH] Prevent user count popovers in GMs from opening view/manage members modal (#5619) --- webapp/components/popover_list_members.jsx | 61 ++++++++++++---------- 1 file changed, 32 insertions(+), 29 deletions(-) diff --git a/webapp/components/popover_list_members.jsx b/webapp/components/popover_list_members.jsx index 6d4ed056cfdda..bd2f744c7f765 100644 --- a/webapp/components/popover_list_members.jsx +++ b/webapp/components/popover_list_members.jsx @@ -16,6 +16,7 @@ import {openDirectChannelToUser} from 'actions/channel_actions.jsx'; import * as AsyncClient from 'utils/async_client.jsx'; import Client from 'client/web_client.jsx'; import * as Utils from 'utils/utils.jsx'; +import Constants from 'utils/constants.jsx'; import $ from 'jquery'; import React from 'react'; @@ -100,7 +101,7 @@ export default class PopoverListMembers extends React.Component { members.forEach((m, i) => { let button = ''; - if (currentUserId !== m.id && this.props.channel.type !== 'D') { + if (currentUserId !== m.id && this.props.channel.type !== Constants.DM_CHANNEl) { button = ( - ); - if (!isAdmin && ChannelStore.isDefault(this.props.channel)) { - membersName = ( + if (this.props.channel.type !== Constants.GM_CHANNEL) { + let membersName = ( ); - } + if (!isAdmin && ChannelStore.isDefault(this.props.channel)) { + membersName = ( + + ); + } - popoverHtml.push( -
-
-
-
- + -
- ); + ); + } } const count = this.props.memberCount;