Put related groups UI behind groups labs flag

This commit is contained in:
Luke Barnard 2017-10-04 14:35:13 +01:00
parent a400c03768
commit ed74ac394b

View file

@ -631,6 +631,14 @@ module.exports = React.createClass({
var self = this; var self = this;
let relatedGroupsSection;
if (UserSettingsStore.isFeatureEnabled('feature_groups')) {
relatedGroupsSection = <RelatedGroupSettings ref="related_groups"
roomId={this.props.room.roomId}
canSetRelatedGroups={roomState.mayClientSendStateEvent("m.room.related_groups", cli)}
relatedGroupsEvent={this.props.room.currentState.getStateEvents('m.room.related_groups', '')} />;
}
var userLevelsSection; var userLevelsSection;
if (Object.keys(user_levels).length) { if (Object.keys(user_levels).length) {
userLevelsSection = userLevelsSection =
@ -855,10 +863,7 @@ module.exports = React.createClass({
canonicalAliasEvent={this.props.room.currentState.getStateEvents('m.room.canonical_alias', '')} canonicalAliasEvent={this.props.room.currentState.getStateEvents('m.room.canonical_alias', '')}
aliasEvents={this.props.room.currentState.getStateEvents('m.room.aliases')} /> aliasEvents={this.props.room.currentState.getStateEvents('m.room.aliases')} />
<RelatedGroupSettings ref="related_groups" { relatedGroupsSection }
roomId={this.props.room.roomId}
canSetRelatedGroups={roomState.mayClientSendStateEvent("m.room.related_groups", cli)}
relatedGroupsEvent={this.props.room.currentState.getStateEvents('m.room.related_groups', '')} />
<UrlPreviewSettings ref="url_preview_settings" room={this.props.room} /> <UrlPreviewSettings ref="url_preview_settings" room={this.props.room} />