Pass room metadata from 3pid invite emails all the way through to the relevant components so we can display it.

This commit is contained in:
David Baker 2016-03-01 18:23:57 +00:00
parent db1e1c7df0
commit 9085a2a866
4 changed files with 102 additions and 38 deletions

View file

@ -59,6 +59,12 @@ module.exports = React.createClass({
// (given as part of the link in the invite email)
inviteSignUrl: React.PropTypes.string,
// Any data about the room that would normally come from the Home Server
// but has been passed out-of-band, eg. the room name and avatar URL
// from an email invite (a workaround for the fact that we can't
// get this information from the HS using an email invite).
oobData: React.PropTypes.object,
// id of an event to jump to. If not given, will go to the end of the
// live timeline.
eventId: React.PropTypes.string,
@ -1052,13 +1058,19 @@ module.exports = React.createClass({
);
}
else {
var inviterName = undefined;
if (this.props.oobData) {
inviterName = this.props.oobData.inviterName;
}
return (
<div className="mx_RoomView">
<RoomHeader ref="header" room={this.state.room} simpleHeader="Join room"/>
<RoomHeader ref="header" room={this.state.room} oobData={this.props.oobData} />
<div className="mx_RoomView_auxPanel">
<RoomPreviewBar onJoinClick={ this.onJoinButtonClicked }
canJoin={ true } canPreview={ false }
spinner={this.state.joining}
inviterName={inviterName}
/>
</div>
<div className="mx_RoomView_messagePanel"></div>
@ -1293,6 +1305,7 @@ module.exports = React.createClass({
return (
<div className={ "mx_RoomView" + (inCall ? " mx_RoomView_inCall" : "") } ref="roomView">
<RoomHeader ref="header" room={this.state.room} searchInfo={searchInfo}
oobData={this.state.oobData}
editing={this.state.editingRoomSettings}
onSearchClick={this.onSearchClick}
onSettingsClick={this.onSettingsClick}