diff --git a/src/components/structures/GroupView.js b/src/components/structures/GroupView.js index f86519c529..e12dc22491 100644 --- a/src/components/structures/GroupView.js +++ b/src/components/structures/GroupView.js @@ -450,6 +450,8 @@ export default React.createClass({ this._groupStore.on('update', () => { this.setState({ summary: this._groupStore.getSummary(), + isGroupPublicised: this._groupStore.getGroupPublicity(), + isUserPrivileged: this._groupStore.isUserPrivileged(), error: null, }); }); diff --git a/src/stores/GroupStore.js b/src/stores/GroupStore.js index 73118993f9..c1ef4619cd 100644 --- a/src/stores/GroupStore.js +++ b/src/stores/GroupStore.js @@ -61,6 +61,14 @@ export default class GroupStore extends EventEmitter { return this._rooms; } + getGroupPublicity() { + return this._summary.user ? this._summary.user.is_publicised : null; + } + + isUserPrivileged() { + return this._summary.user ? this._summary.user.is_privileged : null; + } + addRoomToGroup(roomId) { return this._matrixClient .addRoomToGroup(this.groupId, roomId)