-
-
Notifications
You must be signed in to change notification settings - Fork 828
rework roomsettings for new visibility UI #241
Conversation
MatrixClientPeg.get().getRoomVisibility( | ||
this.props.room.roomId | ||
).done((result) => { | ||
self.setState({ isRoomPublished: result.visibility === "public" }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: You're being awesome and using arrow functions, but yet still using self
. Arrow functions capture this
correctly, so you can drop the self
.
I'm surprised that there isn't a way to get room visibility beyond the GET - I thought we were bundling it with |
… up with guest_access=forbidden but join_rules=invite
@kegsay - have addressed all of the above. the API does't yet return visibility in m.room.aliases, this is filed as SPEC-371. PTAL. |
@@ -56,15 +56,15 @@ module.exports = React.createClass({ | |||
tags_changed: false, | |||
tags: tags, | |||
areNotifsMuted: areNotifsMuted, | |||
isRoomPublished: false, // updated in componentWillMount |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will race with getting the room directory visibility. We probably want to guard against this (of which the simplest would probably be to set this to undefined
and then not touch the visibility if it is still undefined
on save).
LGTM |
rework roomsettings for new visibility UI
depends on matrix-org/matrix-js-sdk#117
fixes element-hq/element-web#1059