summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorhmhealey <harrisonmhealey@gmail.com>2015-11-02 11:55:43 -0500
committerhmhealey <harrisonmhealey@gmail.com>2015-11-02 11:55:43 -0500
commit3b86818382610f32f1006c89e98949275ee6b1fe (patch)
tree959752d09fd34718f6b5cf1e64d58a6a1f135aad /web
parente5a5934ab4a950ce5f920958e694397c584430d5 (diff)
downloadchat-3b86818382610f32f1006c89e98949275ee6b1fe.tar.gz
chat-3b86818382610f32f1006c89e98949275ee6b1fe.tar.bz2
chat-3b86818382610f32f1006c89e98949275ee6b1fe.zip
Hid direct message channels from search autocomplete
Diffstat (limited to 'web')
-rw-r--r--web/react/components/search_autocomplete.jsx5
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));