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

rework roomsettings for new visibility UI #241

Merged
merged 3 commits into from
Mar 22, 2016
Merged

Conversation

ara4n
Copy link
Member

@ara4n ara4n commented Mar 22, 2016

MatrixClientPeg.get().getRoomVisibility(
this.props.room.roomId
).done((result) => {
self.setState({ isRoomPublished: result.visibility === "public" });
Copy link
Member

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.

@kegsay
Copy link
Member

kegsay commented Mar 22, 2016

I'm surprised that there isn't a way to get room visibility beyond the GET - I thought we were bundling it with m.room.aliases? If so, we should probably check for it?

… up with guest_access=forbidden but join_rules=invite
@ara4n
Copy link
Member Author

ara4n commented Mar 22, 2016

@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
Copy link
Member

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).

@kegsay
Copy link
Member

kegsay commented Mar 22, 2016

LGTM

ara4n added a commit that referenced this pull request Mar 22, 2016
rework roomsettings for new visibility UI
@ara4n ara4n merged commit e141a44 into develop Mar 22, 2016
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.

Public/Private wording in Room Settings need to be improved
2 participants