mirror of https://github.com/vector-im/riot-web
Add useful functions to GroupView to inspect user flags
parent
626f007f4e
commit
0415869b8c
|
@ -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,
|
||||
});
|
||||
});
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue