From a73436e1a18467c2954dcfccae426f74c0bcf7e4 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 25 Jun 2019 20:31:20 -0600 Subject: [PATCH 1/3] Don't use oobData if there is none Fixes the "buttons don't work" problem on https://github.com/vector-im/riot-web/issues/10114 --- src/components/views/rooms/RoomPreviewBar.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/views/rooms/RoomPreviewBar.js b/src/components/views/rooms/RoomPreviewBar.js index cbc44d0933..ac52f60347 100644 --- a/src/components/views/rooms/RoomPreviewBar.js +++ b/src/components/views/rooms/RoomPreviewBar.js @@ -238,9 +238,9 @@ module.exports = React.createClass({ params: { email: this.props.invitedEmail, signurl: this.props.signUrl, - room_name: this.props.oobData.room_name, - room_avatar_url: this.props.oobData.avatarUrl, - inviter_name: this.props.oobData.inviterName, + room_name: this.props.oobData ? this.props.oobData.room_name : null, + room_avatar_url: this.props.oobData ? this.props.oobData.avatarUrl : null, + inviter_name: this.props.oobData ? this.props.oobData.inviterName : null, } }; }, From e5c3e5988b37084d8534adc43dd8883d2c785576 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 25 Jun 2019 20:31:20 -0600 Subject: [PATCH 2/3] Revert "Don't use oobData if there is none" This reverts commit a73436e1a18467c2954dcfccae426f74c0bcf7e4. --- src/components/views/rooms/RoomPreviewBar.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/views/rooms/RoomPreviewBar.js b/src/components/views/rooms/RoomPreviewBar.js index ac52f60347..cbc44d0933 100644 --- a/src/components/views/rooms/RoomPreviewBar.js +++ b/src/components/views/rooms/RoomPreviewBar.js @@ -238,9 +238,9 @@ module.exports = React.createClass({ params: { email: this.props.invitedEmail, signurl: this.props.signUrl, - room_name: this.props.oobData ? this.props.oobData.room_name : null, - room_avatar_url: this.props.oobData ? this.props.oobData.avatarUrl : null, - inviter_name: this.props.oobData ? this.props.oobData.inviterName : null, + room_name: this.props.oobData.room_name, + room_avatar_url: this.props.oobData.avatarUrl, + inviter_name: this.props.oobData.inviterName, } }; }, From 5f242f02857c25c2fd9fe47c352781368a4d7df8 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 25 Jun 2019 20:57:07 -0600 Subject: [PATCH 3/3] Supply oobData instead of erroring --- src/components/structures/RoomView.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index cda3f60fce..724450d965 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -1526,6 +1526,7 @@ module.exports = React.createClass({ error={this.state.roomLoadError} loading={loading} joining={this.state.joining} + oobData={this.props.oobData} /> );