You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-22 18:41:57 +03:00
Add useful functions to GroupView to inspect user flags
This commit is contained in:
@ -450,6 +450,8 @@ export default React.createClass({
|
|||||||
this._groupStore.on('update', () => {
|
this._groupStore.on('update', () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
summary: this._groupStore.getSummary(),
|
summary: this._groupStore.getSummary(),
|
||||||
|
isGroupPublicised: this._groupStore.getGroupPublicity(),
|
||||||
|
isUserPrivileged: this._groupStore.isUserPrivileged(),
|
||||||
error: null,
|
error: null,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -61,6 +61,14 @@ export default class GroupStore extends EventEmitter {
|
|||||||
return this._rooms;
|
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) {
|
addRoomToGroup(roomId) {
|
||||||
return this._matrixClient
|
return this._matrixClient
|
||||||
.addRoomToGroup(this.groupId, roomId)
|
.addRoomToGroup(this.groupId, roomId)
|
||||||
|
Reference in New Issue
Block a user