Merge pull request #1598 from matrix-org/luke/groups-update-group-room-visibility-api

Modify the group room visibility API to reflect the js-sdk changes
pull/21833/head
Luke Barnard 2017-11-09 17:34:18 +00:00 committed by GitHub
commit 7893927e14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -137,7 +137,7 @@ module.exports = React.createClass({
const groupId = this.props.groupId; const groupId = this.props.groupId;
const roomId = this.props.groupRoomId; const roomId = this.props.groupRoomId;
const roomName = this.state.groupRoom.displayname; const roomName = this.state.groupRoom.displayname;
this._groupStore.updateGroupRoomAssociation(roomId, isPublic).catch((err) => { this._groupStore.updateGroupRoomVisibility(roomId, isPublic).catch((err) => {
console.error(`Error whilst changing visibility of ${roomId} in ${groupId} to ${isPublic}`, err); console.error(`Error whilst changing visibility of ${roomId} in ${groupId} to ${isPublic}`, err);
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
Modal.createTrackedDialog('Failed to remove room from group', '', ErrorDialog, { Modal.createTrackedDialog('Failed to remove room from group', '', ErrorDialog, {

View File

@ -150,9 +150,9 @@ export default class GroupStore extends EventEmitter {
.then(this._fetchRooms.bind(this)); .then(this._fetchRooms.bind(this));
} }
updateGroupRoomAssociation(roomId, isPublic) { updateGroupRoomVisibility(roomId, isPublic) {
return this._matrixClient return this._matrixClient
.updateGroupRoomAssociation(this.groupId, roomId, isPublic) .updateGroupRoomVisibility(this.groupId, roomId, isPublic)
.then(this._fetchRooms.bind(this)); .then(this._fetchRooms.bind(this));
} }