diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-06-21 10:38:19 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-21 10:38:19 -0400 |
commit | 6bfb7ea3a91187a3f95f22b16933530eb784e06f (patch) | |
tree | 40af3e54ffb160c886c0f10db31ce13e135ab015 /webapp/components/post_view/reaction/reaction.jsx | |
parent | f80003a975d40741803fee576f57f2700a95656f (diff) | |
download | chat-6bfb7ea3a91187a3f95f22b16933530eb784e06f.tar.gz chat-6bfb7ea3a91187a3f95f22b16933530eb784e06f.tar.bz2 chat-6bfb7ea3a91187a3f95f22b16933530eb784e06f.zip |
Fix JS error when hovering over reactions (#6710)
* Fix JS error when hovering over reactions
* Fix autocomplete for custom emojis
* Update to latest mattermost-redux
Diffstat (limited to 'webapp/components/post_view/reaction/reaction.jsx')
-rw-r--r-- | webapp/components/post_view/reaction/reaction.jsx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/webapp/components/post_view/reaction/reaction.jsx b/webapp/components/post_view/reaction/reaction.jsx index 5b65e604f..7fad56d62 100644 --- a/webapp/components/post_view/reaction/reaction.jsx +++ b/webapp/components/post_view/reaction/reaction.jsx @@ -42,6 +42,11 @@ export default class Reaction extends React.PureComponent { otherUsersCount: PropTypes.number.isRequired, /* + * Array of reactions by user + */ + reactions: PropTypes.arrayOf(PropTypes.object).isRequired, + + /* * The URL of the emoji image */ emojiImageUrl: PropTypes.string.isRequired, @@ -82,6 +87,11 @@ export default class Reaction extends React.PureComponent { this.props.actions.removeReaction(this.props.post.id, this.props.emojiName); } + loadMissingProfiles = () => { + const ids = this.props.reactions.map((reaction) => reaction.user_id); + this.props.actions.getMissingProfilesByIds(ids); + } + render() { let currentUserReacted = false; const users = []; @@ -219,7 +229,7 @@ export default class Reaction extends React.PureComponent { {clickTooltip} </Tooltip> } - onEnter={this.props.actions.getMissingProfilesByIds} + onEnter={this.loadMissingProfiles} > <div className={className} |