diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2015-10-23 09:40:36 -0400 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2015-10-23 09:40:36 -0400 |
commit | 6724ef4314efbd82e9b608b53679444d60c4ba08 (patch) | |
tree | d418bacee42675152bf0d424b49c6f6ce868e9fc /web/react/components/post.jsx | |
parent | 510abb408b7524cad4be3b1bb73231cfba6fbe43 (diff) | |
parent | 4c0e4991e76c18fd39ffadcf5b0e1943fb4cd2c3 (diff) | |
download | chat-6724ef4314efbd82e9b608b53679444d60c4ba08.tar.gz chat-6724ef4314efbd82e9b608b53679444d60c4ba08.tar.bz2 chat-6724ef4314efbd82e9b608b53679444d60c4ba08.zip |
Merge pull request #1140 from mattermost/plt-787
PLT-787 Auto-embed gifs from .gif links
Diffstat (limited to 'web/react/components/post.jsx')
-rw-r--r-- | web/react/components/post.jsx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/web/react/components/post.jsx b/web/react/components/post.jsx index bc3144dbc..dedac8951 100644 --- a/web/react/components/post.jsx +++ b/web/react/components/post.jsx @@ -120,6 +120,10 @@ export default class Post extends React.Component { var parentPost = this.props.parentPost; var posts = this.props.posts; + if (!post.props) { + post.props = {}; + } + var type = 'Post'; if (post.root_id && post.root_id.length > 0) { type = 'Comment'; @@ -140,7 +144,7 @@ export default class Post extends React.Component { } var currentUserCss = ''; - if (UserStore.getCurrentId() === post.user_id) { + if (UserStore.getCurrentId() === post.user_id && !post.props.from_webhook) { currentUserCss = 'current--user'; } @@ -200,6 +204,7 @@ export default class Post extends React.Component { posts={posts} handleCommentClick={this.handleCommentClick} retryPost={this.retryPost} + resize={this.props.resize} /> <PostInfo ref='info' @@ -223,5 +228,6 @@ Post.propTypes = { sameUser: React.PropTypes.bool, sameRoot: React.PropTypes.bool, hideProfilePic: React.PropTypes.bool, - isLastComment: React.PropTypes.bool + isLastComment: React.PropTypes.bool, + resize: React.PropTypes.func }; |