From 5840905c7ff4cd37c54a0bbebddaeb2969c120cb Mon Sep 17 00:00:00 2001
From: Carlos Tadeu Panato Junior <ctadeu@gmail.com>
Date: Tue, 25 Jul 2017 21:10:39 +0200
Subject: [PLT-6744] Add "Only visible to you" note for ephemeral messages
 (#6790)

---
 webapp/components/rhs_comment.jsx | 11 +++++++++++
 1 file changed, 11 insertions(+)

(limited to 'webapp/components/rhs_comment.jsx')

diff --git a/webapp/components/rhs_comment.jsx b/webapp/components/rhs_comment.jsx
index 6592c487d..3813fe5a0 100644
--- a/webapp/components/rhs_comment.jsx
+++ b/webapp/components/rhs_comment.jsx
@@ -226,6 +226,7 @@ export default class RhsComment extends React.Component {
             />
         );
 
+        let visibleMessage;
         if (post.props && post.props.from_webhook) {
             if (post.props.override_username && global.window.mm_config.EnablePostUsernameOverride === 'true') {
                 userProfile = (
@@ -259,6 +260,15 @@ export default class RhsComment extends React.Component {
                     disablePopover={true}
                 />
             );
+
+            visibleMessage = (
+                <span className='post__visibility'>
+                    <FormattedMessage
+                        id='post_info.message.visible'
+                        defaultMessage='(Only visible to you)'
+                    />
+                </span>
+            );
         }
 
         let failedPostOptions;
@@ -430,6 +440,7 @@ export default class RhsComment extends React.Component {
                                     isFlagged={this.props.isFlagged}
                                     isEphemeral={isEphemeral}
                                 />
+                                {visibleMessage}
                             </div>
                             {options}
                         </div>
-- 
cgit v1.2.3-1-g7c22

