s/roomAlias/roomAddress/ to reduce confusion

pull/21833/head
Richard van der Hoff 2016-04-13 12:26:40 +01:00
parent 93a142480c
commit ec5ca1ca28
2 changed files with 8 additions and 8 deletions

View File

@ -1055,7 +1055,7 @@ module.exports = React.createClass({
page_element = ( page_element = (
<RoomView <RoomView
ref="roomView" ref="roomView"
roomAlias={this.state.currentRoom || this.state.currentRoomAlias} roomAddress={this.state.currentRoom || this.state.currentRoomAlias}
eventId={this.state.initialEventId} eventId={this.state.initialEventId}
thirdPartyInvite={this.state.thirdPartyInvite} thirdPartyInvite={this.state.thirdPartyInvite}
oobData={this.state.roomOobData} oobData={this.state.roomOobData}

View File

@ -62,7 +62,7 @@ module.exports = React.createClass({
// different components (RoomView, MatrixChat, RoomDirectory, // different components (RoomView, MatrixChat, RoomDirectory,
// SlashCommands) have logic for turning aliases into rooms, and each // SlashCommands) have logic for turning aliases into rooms, and each
// of them do it differently and have different edge cases. // of them do it differently and have different edge cases.
roomAlias: React.PropTypes.string.isRequired, roomAddress: React.PropTypes.string.isRequired,
// An object representing a third party invite to join this room // An object representing a third party invite to join this room
// Fields: // Fields:
@ -97,7 +97,7 @@ module.exports = React.createClass({
}, },
getInitialState: function() { getInitialState: function() {
var room = MatrixClientPeg.get().getRoom(this.props.roomAlias); var room = MatrixClientPeg.get().getRoom(this.props.roomAddress);
return { return {
room: room, room: room,
roomLoading: !room, roomLoading: !room,
@ -149,9 +149,9 @@ module.exports = React.createClass({
// We can /peek though. If it fails then we present the join UI. If it // We can /peek though. If it fails then we present the join UI. If it
// succeeds then great, show the preview (but we still may be able to /join!). // succeeds then great, show the preview (but we still may be able to /join!).
if (!this.state.room) { if (!this.state.room) {
console.log("Attempting to peek into room %s", this.props.roomAlias); console.log("Attempting to peek into room %s", this.props.roomAddress);
MatrixClientPeg.get().peekInRoom(this.props.roomAlias).then((room) => { MatrixClientPeg.get().peekInRoom(this.props.roomAddress).then((room) => {
this.setState({ this.setState({
room: room, room: room,
roomLoading: false, roomLoading: false,
@ -258,7 +258,7 @@ module.exports = React.createClass({
}, },
componentWillReceiveProps: function(newProps) { componentWillReceiveProps: function(newProps) {
if (newProps.roomAlias != this.props.roomAlias) { if (newProps.roomAddress != this.props.roomAddress) {
throw new Error("changing room on a RoomView is not supported"); throw new Error("changing room on a RoomView is not supported");
} }
@ -554,7 +554,7 @@ module.exports = React.createClass({
display_name_promise.then(() => { display_name_promise.then(() => {
var sign_url = this.props.thirdPartyInvite ? this.props.thirdPartyInvite.inviteSignUrl : undefined; var sign_url = this.props.thirdPartyInvite ? this.props.thirdPartyInvite.inviteSignUrl : undefined;
return MatrixClientPeg.get().joinRoom(this.props.roomAlias, return MatrixClientPeg.get().joinRoom(this.props.roomAddress,
{ inviteSignUrl: sign_url } ) { inviteSignUrl: sign_url } )
}).then(function(resp) { }).then(function(resp) {
var roomId = resp.roomId; var roomId = resp.roomId;
@ -930,7 +930,7 @@ module.exports = React.createClass({
this.setState({ this.setState({
rejecting: true rejecting: true
}); });
MatrixClientPeg.get().leave(this.props.roomAlias).done(function() { MatrixClientPeg.get().leave(this.props.roomAddress).done(function() {
dis.dispatch({ action: 'view_next_room' }); dis.dispatch({ action: 'view_next_room' });
self.setState({ self.setState({
rejecting: false rejecting: false