summaryrefslogtreecommitdiffstats
path: root/webapp
diff options
context:
space:
mode:
authorSaturnino Abril <saturnino.abril@gmail.com>2017-07-18 06:27:29 +0800
committerGitHub <noreply@github.com>2017-07-18 06:27:29 +0800
commit41969ae66c2d140b004e6dbced597749f34aedf8 (patch)
treeea4fc4e53ec9c356e6a7031f516ca13b667b94b2 /webapp
parent3e090162aaac7cbc75900635b800d96e9e9050e3 (diff)
downloadchat-41969ae66c2d140b004e6dbced597749f34aedf8.tar.gz
chat-41969ae66c2d140b004e6dbced597749f34aedf8.tar.bz2
chat-41969ae66c2d140b004e6dbced597749f34aedf8.zip
[PLT-7141] Fix deactivated user from appearing in channel view members list filtering (#6957)
* fix deactivated user from appearing in channel view members list filtering * add deactivated user filters to channels, teams and DM
Diffstat (limited to 'webapp')
-rw-r--r--webapp/components/add_users_to_team/add_users_to_team.jsx7
-rw-r--r--webapp/components/channel_invite_modal/channel_invite_modal.jsx7
-rw-r--r--webapp/components/member_list_channel/member_list_channel.jsx2
-rw-r--r--webapp/components/more_direct_channels/more_direct_channels.jsx7
4 files changed, 19 insertions, 4 deletions
diff --git a/webapp/components/add_users_to_team/add_users_to_team.jsx b/webapp/components/add_users_to_team/add_users_to_team.jsx
index 19e0d674b..e3eb8477b 100644
--- a/webapp/components/add_users_to_team/add_users_to_team.jsx
+++ b/webapp/components/add_users_to_team/add_users_to_team.jsx
@@ -215,6 +215,11 @@ export default class AddUsersToTeam extends React.Component {
/>
);
+ let users = [];
+ if (this.state.users) {
+ users = this.state.users.filter((user) => user.delete_at === 0);
+ }
+
return (
<Modal
dialogClassName={'more-modal more-direct-channels'}
@@ -238,7 +243,7 @@ export default class AddUsersToTeam extends React.Component {
<Modal.Body>
<MultiSelect
key='addUsersToTeamKey'
- options={this.state.users}
+ options={users}
optionRenderer={this.renderOption}
values={this.state.values}
valueRenderer={this.renderValue}
diff --git a/webapp/components/channel_invite_modal/channel_invite_modal.jsx b/webapp/components/channel_invite_modal/channel_invite_modal.jsx
index d2fceb2c3..8b09a7496 100644
--- a/webapp/components/channel_invite_modal/channel_invite_modal.jsx
+++ b/webapp/components/channel_invite_modal/channel_invite_modal.jsx
@@ -143,13 +143,18 @@ export default class ChannelInviteModal extends React.Component {
inviteError = (<label className='has-error control-label'>{this.state.inviteError}</label>);
}
+ let users = [];
+ if (this.state.users) {
+ users = this.state.users.filter((user) => user.delete_at === 0);
+ }
+
let content;
if (this.state.loading) {
content = (<LoadingScreen/>);
} else {
content = (
<SearchableUserList
- users={this.state.users}
+ users={users}
usersPerPage={USERS_PER_PAGE}
total={this.state.total}
nextPage={this.nextPage}
diff --git a/webapp/components/member_list_channel/member_list_channel.jsx b/webapp/components/member_list_channel/member_list_channel.jsx
index f47f26cf6..272e210ce 100644
--- a/webapp/components/member_list_channel/member_list_channel.jsx
+++ b/webapp/components/member_list_channel/member_list_channel.jsx
@@ -146,7 +146,7 @@ export default class MemberListChannel extends React.Component {
for (let i = 0; i < users.length; i++) {
const user = users[i];
- if (teamMembers[user.id] && channelMembers[user.id]) {
+ if (teamMembers[user.id] && channelMembers[user.id] && user.delete_at === 0) {
usersToDisplay.push(user);
actionUserProps[user.id] = {
channel: this.props.channel,
diff --git a/webapp/components/more_direct_channels/more_direct_channels.jsx b/webapp/components/more_direct_channels/more_direct_channels.jsx
index 705c1ac95..0e50eca72 100644
--- a/webapp/components/more_direct_channels/more_direct_channels.jsx
+++ b/webapp/components/more_direct_channels/more_direct_channels.jsx
@@ -292,6 +292,11 @@ export default class MoreDirectChannels extends React.Component {
/>
);
+ let users = [];
+ if (this.state.users) {
+ users = this.state.users.filter((user) => user.delete_at === 0);
+ }
+
return (
<Modal
dialogClassName={'more-modal more-direct-channels'}
@@ -310,7 +315,7 @@ export default class MoreDirectChannels extends React.Component {
<Modal.Body>
<MultiSelect
key='moreDirectChannelsList'
- options={this.state.users}
+ options={users}
optionRenderer={this.renderOption}
values={this.state.values}
valueRenderer={this.renderValue}