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/search_results.jsx | 6 ++++++
 1 file changed, 6 insertions(+)

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

diff --git a/web/react/components/search_results.jsx b/web/react/components/search_results.jsx
index 51aefd3b8..15c2b37a2 100644
--- a/web/react/components/search_results.jsx
+++ b/web/react/components/search_results.jsx
@@ -43,6 +43,7 @@ SearchItem = React.createClass({
         e.preventDefault();
 
         var self = this;
+
         client.getPost(
             this.props.post.channel_id,
             this.props.post.id,
@@ -64,6 +65,11 @@ SearchItem = React.createClass({
                 dispatchError(err, "getPost");
             }
         );
+
+    var postChannel = ChannelStore.get(this.props.post.channel_id);
+    var teammate = postChannel.type === 'D' ? utils.getDirectTeammate(this.props.post.channel_id).username : "";
+
+    utils.switchChannel(postChannel,teammate);
     },
     render: function() {
 
-- 
cgit v1.2.3-1-g7c22

