diff options
author | hmhealey <harrisonmhealey@gmail.com> | 2015-11-02 11:55:43 -0500 |
---|---|---|
committer | hmhealey <harrisonmhealey@gmail.com> | 2015-11-02 11:55:43 -0500 |
commit | 3b86818382610f32f1006c89e98949275ee6b1fe (patch) | |
tree | 959752d09fd34718f6b5cf1e64d58a6a1f135aad /web/react/components | |
parent | e5a5934ab4a950ce5f920958e694397c584430d5 (diff) | |
download | chat-3b86818382610f32f1006c89e98949275ee6b1fe.tar.gz chat-3b86818382610f32f1006c89e98949275ee6b1fe.tar.bz2 chat-3b86818382610f32f1006c89e98949275ee6b1fe.zip |
Hid direct message channels from search autocomplete
Diffstat (limited to 'web/react/components')
-rw-r--r-- | web/react/components/search_autocomplete.jsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/web/react/components/search_autocomplete.jsx b/web/react/components/search_autocomplete.jsx index f7d772677..03e14ec49 100644 --- a/web/react/components/search_autocomplete.jsx +++ b/web/react/components/search_autocomplete.jsx @@ -142,7 +142,10 @@ export default class SearchAutocomplete extends React.Component { let channels = ChannelStore.getAll(); if (filter) { - channels = channels.filter((channel) => channel.name.startsWith(filter)); + channels = channels.filter((channel) => channel.name.startsWith(filter) && channel.type !== 'D'); + } else { + // don't show direct channels + channels = channels.filter((channel) => channel.type !== 'D'); } channels.sort((a, b) => a.name.localeCompare(b.name)); |