Fix add reaction prompt showing even when user is not joined to room

pull/21833/head
Michael Telatynski 2021-05-20 12:20:53 +01:00
parent aa4984019c
commit dab75f9b88
1 changed files with 2 additions and 1 deletions

View File

@ -198,7 +198,8 @@ export default class ReactionsRow extends React.PureComponent<IProps, IState> {
const cli = this.context;
let addReactionButton;
if (cli.getRoom(mxEvent.getRoomId()).currentState.maySendEvent(EventType.Reaction, cli.getUserId())) {
const room = cli.getRoom(mxEvent.getRoomId());
if (room.getMyMembership() === "join" && room.currentState.maySendEvent(EventType.Reaction, cli.getUserId())) {
addReactionButton = <ReactButton mxEvent={mxEvent} reactions={reactions} />;
}