diff options
author | Joram Wilander <jwawilander@gmail.com> | 2016-12-06 10:22:45 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-06 10:22:45 -0500 |
commit | dcf11a14d8363c79ab62aefca46834d6daa615ab (patch) | |
tree | 27db991b5c028da5392f1c22fb4528f9f24c4b17 /webapp | |
parent | 4df1ad2b28a660b1a0b96869701ffb0b9f0a6219 (diff) | |
download | chat-dcf11a14d8363c79ab62aefca46834d6daa615ab.tar.gz chat-dcf11a14d8363c79ab62aefca46834d6daa615ab.tar.bz2 chat-dcf11a14d8363c79ab62aefca46834d6daa615ab.zip |
Don't show status for posts from webhooks (#4726)
Diffstat (limited to 'webapp')
-rw-r--r-- | webapp/components/post_view/components/post.jsx | 7 | ||||
-rw-r--r-- | webapp/components/rhs_comment.jsx | 9 | ||||
-rw-r--r-- | webapp/components/rhs_root_post.jsx | 7 |
3 files changed, 19 insertions, 4 deletions
diff --git a/webapp/components/post_view/components/post.jsx b/webapp/components/post_view/components/post.jsx index 58ea947b2..051ce0744 100644 --- a/webapp/components/post_view/components/post.jsx +++ b/webapp/components/post_view/components/post.jsx @@ -184,10 +184,15 @@ export default class Post extends React.Component { rootUser = ''; } + let status = this.props.status; + if (post.props && post.props.from_webhook === 'true') { + status = null; + } + let profilePic = ( <ProfilePicture src={PostUtils.getProfilePicSrcForPost(post, timestamp)} - status={this.props.status} + status={status} user={this.props.user} /> ); diff --git a/webapp/components/rhs_comment.jsx b/webapp/components/rhs_comment.jsx index f4cc0d8e5..bb04480ed 100644 --- a/webapp/components/rhs_comment.jsx +++ b/webapp/components/rhs_comment.jsx @@ -264,10 +264,15 @@ export default class RhsComment extends React.Component { ); } + let status = this.props.status; + if (post.props && post.props.from_webhook === 'true') { + status = null; + } + let profilePic = ( <ProfilePicture src={PostUtils.getProfilePicSrcForPost(post, timestamp)} - status={this.props.status} + status={status} width='36' height='36' user={this.props.user} @@ -281,7 +286,7 @@ export default class RhsComment extends React.Component { profilePic = ( <ProfilePicture src='' - status={this.props.status} + status={status} user={this.props.user} /> ); diff --git a/webapp/components/rhs_root_post.jsx b/webapp/components/rhs_root_post.jsx index 1e6ed4ff5..6f4372973 100644 --- a/webapp/components/rhs_root_post.jsx +++ b/webapp/components/rhs_root_post.jsx @@ -274,10 +274,15 @@ export default class RhsRootPost extends React.Component { ); } + let status = this.props.status; + if (post.props && post.props.from_webhook === 'true') { + status = null; + } + let profilePic = ( <ProfilePicture src={PostUtils.getProfilePicSrcForPost(post, timestamp)} - status={this.props.status} + status={status} width='36' height='36' user={this.props.user} |