Prevent user count popovers in GMs from opening view/manage members modal (#5619)
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
c3aff45250
Коммит
f37c03a75f
@@ -16,6 +16,7 @@ import {openDirectChannelToUser} from 'actions/channel_actions.jsx';
|
|||||||
import * as AsyncClient from 'utils/async_client.jsx';
|
import * as AsyncClient from 'utils/async_client.jsx';
|
||||||
import Client from 'client/web_client.jsx';
|
import Client from 'client/web_client.jsx';
|
||||||
import * as Utils from 'utils/utils.jsx';
|
import * as Utils from 'utils/utils.jsx';
|
||||||
|
import Constants from 'utils/constants.jsx';
|
||||||
|
|
||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
@@ -100,7 +101,7 @@ export default class PopoverListMembers extends React.Component {
|
|||||||
|
|
||||||
members.forEach((m, i) => {
|
members.forEach((m, i) => {
|
||||||
let button = '';
|
let button = '';
|
||||||
if (currentUserId !== m.id && this.props.channel.type !== 'D') {
|
if (currentUserId !== m.id && this.props.channel.type !== Constants.DM_CHANNEl) {
|
||||||
button = (
|
button = (
|
||||||
<a
|
<a
|
||||||
href='#'
|
href='#'
|
||||||
@@ -148,6 +149,7 @@ export default class PopoverListMembers extends React.Component {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (this.props.channel.type !== Constants.GM_CHANNEL) {
|
||||||
let membersName = (
|
let membersName = (
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='members_popover.manageMembers'
|
id='members_popover.manageMembers'
|
||||||
@@ -184,6 +186,7 @@ export default class PopoverListMembers extends React.Component {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const count = this.props.memberCount;
|
const count = this.props.memberCount;
|
||||||
let countText = '-';
|
let countText = '-';
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user