diff options
Diffstat (limited to 'web/react/components/search_results.jsx')
-rw-r--r-- | web/react/components/search_results.jsx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/web/react/components/search_results.jsx b/web/react/components/search_results.jsx index 51aefd3b8..003a38b7e 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() { @@ -73,7 +79,7 @@ SearchItem = React.createClass({ if (channel) { if (channel.type === 'D') { - channelName = "Direct Message"; + channelName = "Private Message"; } else { channelName = channel.display_name; } |