From fd310e382a2cc1a9779ef28dee7fea9476bb425f Mon Sep 17 00:00:00 2001 From: nickago Date: Wed, 1 Jul 2015 12:41:36 -0700 Subject: Finally fixed the git weirdness --- web/react/components/sidebar.jsx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'web/react/components/sidebar.jsx') diff --git a/web/react/components/sidebar.jsx b/web/react/components/sidebar.jsx index 10017c7ee..dc8496156 100644 --- a/web/react/components/sidebar.jsx +++ b/web/react/components/sidebar.jsx @@ -269,13 +269,8 @@ var SidebarLoggedIn = React.createClass({ var channel = ChannelStore.getCurrent(); if (channel) { if (channel.type === 'D') { - userIds = channel.name.split('__'); - if (userIds.length < 2) return; - if (userIds[0] == UserStore.getCurrentId() && UserStore.getProfile(userIds[1])) { - document.title = UserStore.getProfile(userIds[1]).username + " " + document.title.substring(document.title.lastIndexOf("-")); - } else if (userIds[1] == UserStore.getCurrentId() && UserStore.getProfile(userIds[0])) { - document.title = UserStore.getProfile(userIds[0]).username + " " + document.title.substring(document.title.lastIndexOf("-")); - } + var teammate_username = utils.getDirectTeammate(channel.id).username + document.title = teammate_username + " " + document.title.substring(document.title.lastIndexOf("-")); } else { document.title = channel.display_name + " " + document.title.substring(document.title.lastIndexOf("-")) } -- cgit v1.2.3-1-g7c22