summaryrefslogtreecommitdiffstats
path: root/webapp/components/suggestion
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-05-03 11:48:44 -0400
committerCorey Hulen <corey@hulen.com>2017-05-03 08:48:44 -0700
commitdc6c836b354bfdbedd0ac9f827c1ab4ec82d9425 (patch)
tree1452da32546865eb5ec00df377cb5f5108ffb94a /webapp/components/suggestion
parent1c8fdb4cdd3469d49fcd5a051d1e92111e87162d (diff)
downloadchat-dc6c836b354bfdbedd0ac9f827c1ab4ec82d9425.tar.gz
chat-dc6c836b354bfdbedd0ac9f827c1ab4ec82d9425.tar.bz2
chat-dc6c836b354bfdbedd0ac9f827c1ab4ec82d9425.zip
Fix group message names in channel switcher (#6246)
Diffstat (limited to 'webapp/components/suggestion')
-rw-r--r--webapp/components/suggestion/switch_channel_provider.jsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/webapp/components/suggestion/switch_channel_provider.jsx b/webapp/components/suggestion/switch_channel_provider.jsx
index 67cda61ea..03930c3f4 100644
--- a/webapp/components/suggestion/switch_channel_provider.jsx
+++ b/webapp/components/suggestion/switch_channel_provider.jsx
@@ -12,7 +12,7 @@ import Client from 'client/web_client.jsx';
import AppDispatcher from 'dispatcher/app_dispatcher.jsx';
import {Constants, ActionTypes} from 'utils/constants.jsx';
import * as Utils from 'utils/utils.jsx';
-import {sortChannelsByDisplayName, buildGroupChannelName} from 'utils/channel_utils.jsx';
+import {sortChannelsByDisplayName, getChannelDisplayName} from 'utils/channel_utils.jsx';
import React from 'react';
@@ -32,8 +32,8 @@ class SwitchChannelSuggestion extends Suggestion {
} else if (item.type === Constants.PRIVATE_CHANNEL) {
icon = <div className='status'><i className='fa fa-lock'/></div>;
} else if (item.type === Constants.GM_CHANNEL) {
- displayName = buildGroupChannelName(item.id);
- icon = <div className='status status--group'>{UserStore.getProfileListInChannel(item.id, true).length}</div>;
+ displayName = getChannelDisplayName(item);
+ icon = <div className='status status--group'>{'G'}</div>;
} else {
icon = (
<div className='pull-left'>
@@ -81,7 +81,7 @@ export default class SwitchChannelProvider extends Provider {
if (channel.display_name.toLowerCase().indexOf(channelPrefix.toLowerCase()) !== -1) {
const newChannel = Object.assign({}, channel);
if (newChannel.type === Constants.GM_CHANNEL) {
- newChannel.name = buildGroupChannelName(newChannel.id);
+ newChannel.name = getChannelDisplayName(newChannel);
}
channels.push(newChannel);
}