Use basic read path from JS SDK for reactions

This displays existing reactions correctly in the action bar and reaction row,
but it doesn't yet update after a new reaction is sent.
This commit is contained in:
J. Ryan Stinnett 2019-05-08 18:16:27 +01:00
parent 8903f65fcb
commit 8fdb59a909
6 changed files with 76 additions and 23 deletions

View file

@ -28,6 +28,8 @@ import { isContentActionable } from '../../../utils/EventUtils';
export default class MessageActionBar extends React.PureComponent {
static propTypes = {
mxEvent: PropTypes.object.isRequired,
// The Relations model from the JS SDK for reactions to `mxEvent`
reactions: PropTypes.object,
permalinkCreator: PropTypes.object,
getTile: PropTypes.func,
getReplyThread: PropTypes.func,
@ -113,6 +115,7 @@ export default class MessageActionBar extends React.PureComponent {
return <ReactionDimension
title={_t("Agree or Disagree")}
options={options}
reactions={this.props.reactions}
/>;
}
@ -135,6 +138,7 @@ export default class MessageActionBar extends React.PureComponent {
return <ReactionDimension
title={_t("Like or Dislike")}
options={options}
reactions={this.props.reactions}
/>;
}