summaryrefslogtreecommitdiffstats
path: root/web/react/components/post_list.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/post_list.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/post_list.jsx')
-rw-r--r--web/react/components/post_list.jsx8
1 files changed, 1 insertions, 7 deletions
diff --git a/web/react/components/post_list.jsx b/web/react/components/post_list.jsx
index e37de8d88..142d7ab1c 100644
--- a/web/react/components/post_list.jsx
+++ b/web/react/components/post_list.jsx
@@ -324,13 +324,7 @@ module.exports = React.createClass({
if (order.length > 0 && order.length % Constants.POST_CHUNK_SIZE === 0) {
more_messages = <a ref="loadmore" className="more-messages-text theme" href="#" onClick={this.getMorePosts}>Load more messages</a>;
} else if (channel.type === 'D') {
- var userIds = channel.name.split('__');
- var teammate;
- if (userIds.length === 2 && userIds[0] === user_id) {
- teammate = UserStore.getProfile(userIds[1]);
- } else if (userIds.length === 2 && userIds[1] === user_id) {
- teammate = UserStore.getProfile(userIds[0]);
- }
+ var teammate = utils.getDirectTeammate(channel.id)
if (teammate) {
var teammate_name = teammate.full_name.length > 0 ? teammate.full_name : teammate.username;