Merge pull request #6073 from matrix-org/t3chguy/fix/17412

Fix add reaction prompt showing even when user is not joined to room
This commit is contained in:
Michael Telatynski 2021-05-20 21:00:10 +01:00 committed by GitHub
commit d0d56d4b42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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} />;
}