summaryrefslogtreecommitdiffstats
path: root/webapp/components/post_view/post_message_view
diff options
context:
space:
mode:
authorDavid Meza <dmeza@users.noreply.github.com>2017-07-31 07:24:13 -0500
committerJoram Wilander <jwawilander@gmail.com>2017-07-31 08:24:13 -0400
commitf740698dbe06816921d2a20eea876c9ca7b515ed (patch)
treedf5c9f4f076c6294da8246275a97133f59b5a82f /webapp/components/post_view/post_message_view
parent22fa48f455f15be7a7528501431841a2c7d84c85 (diff)
downloadchat-f740698dbe06816921d2a20eea876c9ca7b515ed.tar.gz
chat-f740698dbe06816921d2a20eea876c9ca7b515ed.tar.bz2
chat-f740698dbe06816921d2a20eea876c9ca7b515ed.zip
PLT-6486 Add an `@username` button to the profile popover, that puts the username in the post when clicked (#6349)
* PLT-6486 Add an `@username` button to the profile popover, that puts the username in the post when clicked * PLT-6486 Display `@username` mention on the right text area on center or RHS. * Disable @mentions from profile popover on searches, mentions and pinned posts. Fix js errors. * Control undefined post in SearchStore that causes an exception.
Diffstat (limited to 'webapp/components/post_view/post_message_view')
-rw-r--r--webapp/components/post_view/post_message_view/post_message_view.jsx24
1 files changed, 21 insertions, 3 deletions
diff --git a/webapp/components/post_view/post_message_view/post_message_view.jsx b/webapp/components/post_view/post_message_view/post_message_view.jsx
index 1c6035df9..348748450 100644
--- a/webapp/components/post_view/post_message_view/post_message_view.jsx
+++ b/webapp/components/post_view/post_message_view/post_message_view.jsx
@@ -66,12 +66,24 @@ export default class PostMessageView extends React.PureComponent {
/**
* Set to render post body compactly
*/
- compactDisplay: PropTypes.bool
+ compactDisplay: PropTypes.bool,
+
+ /**
+ * Flags if the post_message_view is for the RHS (Reply).
+ */
+ isRHS: PropTypes.bool,
+
+ /**
+ * Flags if the post_message_view is for the RHS (Reply).
+ */
+ hasMention: PropTypes.bool
};
static defaultProps = {
options: {},
- mentionKeys: []
+ mentionKeys: [],
+ isRHS: false,
+ hasMention: false
};
renderDeletedPost() {
@@ -116,7 +128,13 @@ export default class PostMessageView extends React.PureComponent {
processNode: (node) => {
const mentionName = node.attribs[attrib];
- return <AtMention mentionName={mentionName}/>;
+ return (
+ <AtMention
+ mentionName={mentionName}
+ isRHS={this.props.isRHS}
+ hasMention={this.props.hasMention}
+ />
+ );
}
},
{