summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-11-02 15:48:38 -0500
committerChristopher Speller <crspeller@gmail.com>2015-11-02 15:48:38 -0500
commitc5013610c24dc785c5701fb6e06e52817c42ad78 (patch)
tree47739518d91b151f1ec4fb3b4b97064040e608b2 /web
parent81f27e0195e3cb38b6285309be399e9f1f7f8b18 (diff)
parent3b86818382610f32f1006c89e98949275ee6b1fe (diff)
downloadchat-c5013610c24dc785c5701fb6e06e52817c42ad78.tar.gz
chat-c5013610c24dc785c5701fb6e06e52817c42ad78.tar.bz2
chat-c5013610c24dc785c5701fb6e06e52817c42ad78.zip
Merge pull request #1271 from hmhealey/plt890
PLT-890 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));