From 27eeabafe096013f1d0d368a65fe71ef230eab50 Mon Sep 17 00:00:00 2001
From: nickago <ngonella@calpoly.edu>
Date: Wed, 1 Jul 2015 09:48:39 -0700
Subject: Facelifted "direct message" to "private message"

---
 web/react/components/sidebar.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'web/react/components/sidebar.jsx')

diff --git a/web/react/components/sidebar.jsx b/web/react/components/sidebar.jsx
index 10017c7ee..b5598e23a 100644
--- a/web/react/components/sidebar.jsx
+++ b/web/react/components/sidebar.jsx
@@ -414,7 +414,7 @@ var SidebarLoggedIn = React.createClass({
                         {privateChannelItems}
                     </ul>
                     <ul className="nav nav-pills nav-stacked">
-                        <li><h4>Direct Messages</h4></li>
+                        <li><h4>Private Messages</h4></li>
                         {directMessageItems}
                         { this.state.hideDirectChannels.length > 0 ?
                             <li><a href="#" data-toggle="modal" className="nav-more" data-target="#more_direct_channels" data-channels={JSON.stringify(this.state.hideDirectChannels)}>{"More ("+this.state.hideDirectChannels.length+")"}</a></li>
-- 
cgit v1.2.3-1-g7c22


From fd310e382a2cc1a9779ef28dee7fea9476bb425f Mon Sep 17 00:00:00 2001
From: nickago <ngonella@calpoly.edu>
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

