From 2875fa3eb16629bb66a483e1f272b1f340491e5d Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 10 Mar 2016 15:56:58 +0000 Subject: [PATCH 1/3] Show the invite preview bar when we have a 3pid invite, and make the reject button work. --- src/components/structures/RoomView.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 84ad8f595c..6efff19e12 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -883,6 +883,12 @@ module.exports = React.createClass({ }); }, + onRejectThreepidInviteButtonClicked: function(ev) { + dis.dispatch({ + action: 'view_room_directory', + }); + }, + onSearchClick: function() { this.setState({ searching: true }); }, @@ -1086,6 +1092,7 @@ module.exports = React.createClass({
); } From 73781f5619688462e5eb1c2377bf7dcd0d35dcf7 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 10 Mar 2016 17:43:20 +0000 Subject: [PATCH 2/3] doc inviterName --- src/components/views/rooms/RoomPreviewBar.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/views/rooms/RoomPreviewBar.js b/src/components/views/rooms/RoomPreviewBar.js index eb57a0d913..50159401cc 100644 --- a/src/components/views/rooms/RoomPreviewBar.js +++ b/src/components/views/rooms/RoomPreviewBar.js @@ -25,6 +25,9 @@ module.exports = React.createClass({ propTypes: { onJoinClick: React.PropTypes.func, onRejectClick: React.PropTypes.func, + + // if inviterName is specified, the preview bar will shown an invite to the room. + // You should also specify onRejectClick if specifiying inviterName inviterName: React.PropTypes.string, canJoin: React.PropTypes.bool, canPreview: React.PropTypes.bool, From 15170f8718c42879fb6dd57e9f6bb859714d3b0f Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 11 Mar 2016 10:20:52 +0000 Subject: [PATCH 3/3] Comment how we're not rejecting 3pid invites --- src/components/structures/RoomView.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 6efff19e12..622b69051b 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -884,6 +884,10 @@ module.exports = React.createClass({ }, onRejectThreepidInviteButtonClicked: function(ev) { + // We can reject 3pid invites in the same way that we accept them, + // using /leave rather than /join. In the short term though, we + // just ignore them. + // https://github.com/vector-im/vector-web/issues/1134 dis.dispatch({ action: 'view_room_directory', });