summaryrefslogtreecommitdiffstats
path: root/web/react/components/sidebar.jsx
diff options
context:
space:
mode:
authorhmhealey <harrisonmhealey@gmail.com>2015-07-13 17:47:57 -0400
committerhmhealey <harrisonmhealey@gmail.com>2015-07-17 15:22:57 -0400
commit098cbcdc21effeebe7e57fbd912a785e85cbfc5d (patch)
treefca1c712fe315ed49058de974b21efdaa0dd5b9c /web/react/components/sidebar.jsx
parentabcb44089c421872de582584049ca4cc6b268f37 (diff)
downloadchat-098cbcdc21effeebe7e57fbd912a785e85cbfc5d.tar.gz
chat-098cbcdc21effeebe7e57fbd912a785e85cbfc5d.tar.bz2
chat-098cbcdc21effeebe7e57fbd912a785e85cbfc5d.zip
Unify all locations where we determine a user's display named based off of their nickname/username into a helper function
Diffstat (limited to 'web/react/components/sidebar.jsx')
-rw-r--r--web/react/components/sidebar.jsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/web/react/components/sidebar.jsx b/web/react/components/sidebar.jsx
index 742720048..65727c597 100644
--- a/web/react/components/sidebar.jsx
+++ b/web/react/components/sidebar.jsx
@@ -131,7 +131,7 @@ function getStateFromStores() {
var channel = ChannelStore.getByName(channelName);
if (channel != null) {
- channel.display_name = teammate.nickname.trim() != "" ? teammate.nickname : teammate.username;
+ channel.display_name = utils.getDisplayName(teammate);
channel.teammate_username = teammate.username;
channel.status = UserStore.getStatus(teammate.id);
@@ -150,7 +150,7 @@ function getStateFromStores() {
var tempChannel = {};
tempChannel.fake = true;
tempChannel.name = channelName;
- tempChannel.display_name = teammate.nickname.trim() != "" ? teammate.nickname : teammate.username;
+ tempChannel.display_name = utils.getDisplayName(teammate);
tempChannel.status = UserStore.getStatus(teammate.id);
tempChannel.last_post_at = 0;
readDirectChannels.push(tempChannel);