From 41969ae66c2d140b004e6dbced597749f34aedf8 Mon Sep 17 00:00:00 2001
From: Saturnino Abril <saturnino.abril@gmail.com>
Date: Tue, 18 Jul 2017 06:27:29 +0800
Subject: [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
---
 webapp/components/more_direct_channels/more_direct_channels.jsx | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

(limited to 'webapp/components/more_direct_channels/more_direct_channels.jsx')

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}
-- 
cgit v1.2.3-1-g7c22

