diff --git a/src/components/structures/RightPanel.js b/src/components/structures/RightPanel.js
index f3c16021fc..4af7c6a43e 100644
--- a/src/components/structures/RightPanel.js
+++ b/src/components/structures/RightPanel.js
@@ -42,6 +42,7 @@ module.exports = React.createClass({
FilePanel: 'FilePanel',
NotificationPanel: 'NotificationPanel',
RoomMemberInfo: 'RoomMemberInfo',
+ GroupMemberInfo: 'GroupMemberInfo',
},
componentWillMount: function() {
@@ -57,6 +58,10 @@ module.exports = React.createClass({
}
},
+ componentWillReceiveProps: function(newprops) {
+ this.setState(this.getInitialState());
+ },
+
getInitialState: function() {
if (this.props.userId) {
const member = new Matrix.RoomMember(null, this.props.userId);
@@ -142,12 +147,19 @@ module.exports = React.createClass({
});
} else if (this.props.groupId) {
this.setState({
- phase: this.Phase.GroupMemberList
+ phase: this.Phase.GroupMemberList,
+ groupId: payload.groupId,
+ member: payload.member,
});
}
}
- }
- else if (payload.action === "view_room") {
+ } else if (payload.action === "view_group_user") {
+ this.setState({
+ phase: this.Phase.GroupMemberInfo,
+ groupId: payload.groupId,
+ member: payload.member,
+ });
+ } else if (payload.action === "view_room") {
if (this.state.phase === this.Phase.RoomMemberInfo) {
this.setState({
phase: this.Phase.RoomMemberList
@@ -239,9 +251,12 @@ module.exports = React.createClass({
panel =
} else if (this.props.groupId && this.state.phase == this.Phase.GroupMemberList) {
panel =
- } else if(this.state.phase == this.Phase.RoomMemberInfo) {
+ } else if (this.state.phase == this.Phase.RoomMemberInfo) {
const MemberInfo = sdk.getComponent('rooms.MemberInfo');
panel =
+ } else if (this.state.phase == this.Phase.GroupMemberInfo) {
+ const GroupMemberInfo = sdk.getComponent('groups.GroupMemberInfo');
+ panel =
} else if (this.state.phase == this.Phase.NotificationPanel) {
panel =
} else if (this.state.phase == this.Phase.FilePanel) {