Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Add a button to un-ban users in RoomSettings #698

Merged
merged 7 commits into from
Feb 17, 2017
Merged

Conversation

dbkr
Copy link
Member

@dbkr dbkr commented Feb 14, 2017

Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

couple of nits

@@ -102,6 +147,8 @@ module.exports = React.createClass({
componentWillUnmount: function() {
ScalarMessaging.stopListening();

MatrixClientPeg.get().removeListener("RoomMember.membership", this._onRoomMemberMembership);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs a null-guard to handle logout

or better yet, use the matrixclient from the react context rather than MatrixClientPeg

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -35,6 +36,47 @@ function parseIntWithDefault(val, def) {
return isNaN(res) ? def : res;
}

const BannedUser = React.createClass({
propTypes: {
member: React.PropTypes.string.isRequired,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if it's a string, why are you accessing its roomId and userId properties?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@richvdh richvdh assigned dbkr and unassigned richvdh Feb 15, 2017
@dbkr dbkr assigned richvdh and unassigned dbkr Feb 15, 2017
dbkr added 3 commits February 15, 2017 17:58
Revert the WithMatrixClient change: RoomView calls methods on
the RoomSettings component and this breaks when RoomSettings is
wrapped in a WithMatrixClient.
Addresses PR feedback without breaking RoomSettings
@richvdh richvdh merged commit 97722af into develop Feb 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants