mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 05:55:00 +08:00
iterate PR based on feedback
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
fd039431bc
commit
883b3d1563
@ -37,10 +37,14 @@ export default class MessageActionBar extends React.PureComponent {
|
||||
onFocusChange: PropTypes.func,
|
||||
};
|
||||
|
||||
state = {
|
||||
canReact: true,
|
||||
canReply: true,
|
||||
};
|
||||
constructor(props, context) {
|
||||
super(props, context);
|
||||
|
||||
this.state = {
|
||||
canReact: true,
|
||||
canReply: true,
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.props.mxEvent.on("Event.decrypted", this.onDecrypted);
|
||||
@ -65,7 +69,7 @@ export default class MessageActionBar extends React.PureComponent {
|
||||
const cli = MatrixClientPeg.get();
|
||||
const room = cli.getRoom(this.props.mxEvent.getRoomId());
|
||||
if (room) {
|
||||
const me = cli.credentials.userId;
|
||||
const me = cli.getUserId();
|
||||
const canReact = room.getMyMembership() === "join" && room.currentState.maySendEvent("m.reaction", me);
|
||||
const canReply = room.maySendMessage();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user