iterate PR based on feedback
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>pull/21833/head
parent
fd039431bc
commit
883b3d1563
|
@ -37,10 +37,14 @@ export default class MessageActionBar extends React.PureComponent {
|
||||||
onFocusChange: PropTypes.func,
|
onFocusChange: PropTypes.func,
|
||||||
};
|
};
|
||||||
|
|
||||||
state = {
|
constructor(props, context) {
|
||||||
|
super(props, context);
|
||||||
|
|
||||||
|
this.state = {
|
||||||
canReact: true,
|
canReact: true,
|
||||||
canReply: true,
|
canReply: true,
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.props.mxEvent.on("Event.decrypted", this.onDecrypted);
|
this.props.mxEvent.on("Event.decrypted", this.onDecrypted);
|
||||||
|
@ -65,7 +69,7 @@ export default class MessageActionBar extends React.PureComponent {
|
||||||
const cli = MatrixClientPeg.get();
|
const cli = MatrixClientPeg.get();
|
||||||
const room = cli.getRoom(this.props.mxEvent.getRoomId());
|
const room = cli.getRoom(this.props.mxEvent.getRoomId());
|
||||||
if (room) {
|
if (room) {
|
||||||
const me = cli.credentials.userId;
|
const me = cli.getUserId();
|
||||||
const canReact = room.getMyMembership() === "join" && room.currentState.maySendEvent("m.reaction", me);
|
const canReact = room.getMyMembership() === "join" && room.currentState.maySendEvent("m.reaction", me);
|
||||||
const canReply = room.maySendMessage();
|
const canReply = room.maySendMessage();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue