summaryrefslogtreecommitdiffstats
path: root/webapp/components
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components')
-rw-r--r--webapp/components/post_header.jsx2
-rw-r--r--webapp/components/rhs_comment.jsx8
-rw-r--r--webapp/components/search_results_item.jsx9
3 files changed, 16 insertions, 3 deletions
diff --git a/webapp/components/post_header.jsx b/webapp/components/post_header.jsx
index 2b139471d..6fae092e5 100644
--- a/webapp/components/post_header.jsx
+++ b/webapp/components/post_header.jsx
@@ -32,7 +32,7 @@ export default class PostHeader extends React.Component {
);
}
- botIndicator = <li className='col col__name bot-indicator'>{'BOT'}</li>;
+ botIndicator = <li className='col col__name bot-indicator'>{Constants.BOT_NAME}</li>;
} else if (Utils.isSystemMessage(post)) {
userProfile = (
<UserProfile
diff --git a/webapp/components/rhs_comment.jsx b/webapp/components/rhs_comment.jsx
index 17f83170d..a771803b8 100644
--- a/webapp/components/rhs_comment.jsx
+++ b/webapp/components/rhs_comment.jsx
@@ -151,6 +151,11 @@ export default class RhsComment extends React.Component {
var timestamp = this.props.currentUser.update_at;
+ let botIndicator;
+
+ if (post.props && post.props.from_webhook) {
+ botIndicator = <li className='col col__name bot-indicator'>{Constants.BOT_NAME}</li>;
+ }
let loading;
let postClass = '';
let message = (
@@ -206,9 +211,10 @@ export default class RhsComment extends React.Component {
</div>
<div>
<ul className='post__header'>
- <li className='col__name'>
+ <li className='col col__name'>
<strong><UserProfile user={this.props.user}/></strong>
</li>
+ {botIndicator}
<li className='col'>
<time className='post__time'>
<FormattedDate
diff --git a/webapp/components/search_results_item.jsx b/webapp/components/search_results_item.jsx
index 64413a044..708b148d8 100644
--- a/webapp/components/search_results_item.jsx
+++ b/webapp/components/search_results_item.jsx
@@ -67,6 +67,12 @@ export default class SearchResultsItem extends React.Component {
disableProfilePopover = true;
}
+ let botIndicator;
+
+ if (post.props && post.props.from_webhook) {
+ botIndicator = <li className='col col__name bot-indicator'>{Constants.BOT_NAME}</li>;
+ }
+
return (
<div className='search-item__container'>
<div className='date-separator'>
@@ -94,13 +100,14 @@ export default class SearchResultsItem extends React.Component {
</div>
<div>
<ul className='post__header'>
- <li className='col__name'><strong>
+ <li className='col col__name'><strong>
<UserProfile
user={user}
overwriteName={overrideUsername}
disablePopover={disableProfilePopover}
/>
</strong></li>
+ {botIndicator}
<li className='col'>
<time className='search-item-time'>
<FormattedDate