summaryrefslogtreecommitdiffstats
path: root/web/react/components/sidebar.jsx
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2015-07-01 22:19:58 -0800
committerCorey Hulen <corey@hulen.com>2015-07-01 22:19:58 -0800
commitd3efefba1f7d4c5f09f61227c49db9229cc65553 (patch)
treef122ed069ce178429b131eb4ede31209d83e86c5 /web/react/components/sidebar.jsx
parent03d7fb1ff276393f79923f06570035389b7ed261 (diff)
parentfd310e382a2cc1a9779ef28dee7fea9476bb425f (diff)
downloadchat-d3efefba1f7d4c5f09f61227c49db9229cc65553.tar.gz
chat-d3efefba1f7d4c5f09f61227c49db9229cc65553.tar.bz2
chat-d3efefba1f7d4c5f09f61227c49db9229cc65553.zip
Merge pull request #92 from nickago/MM-1151
MM-1151 clickable search results
Diffstat (limited to 'web/react/components/sidebar.jsx')
-rw-r--r--web/react/components/sidebar.jsx9
1 files changed, 2 insertions, 7 deletions
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("-"))
}