diff --git a/src/components/structures/GroupView.js b/src/components/structures/GroupView.js index 76f6bc7335..28dd5c0bbb 100644 --- a/src/components/structures/GroupView.js +++ b/src/components/structures/GroupView.js @@ -467,6 +467,9 @@ export default React.createClass({ isUserPrivileged: this._groupStore.isUserPrivileged(), groupRooms: this._groupStore.getGroupRooms(), groupRoomsLoading: !this._groupStore.isStateReady('GroupStore.GroupRooms'), + isUserMember: this._groupStore.getGroupMembers().some( + (m) => m.userId === MatrixClientPeg.get().credentials.userId, + ), error: null, }); }); @@ -935,27 +938,28 @@ export default React.createClass({ tabIndex="2" dir="auto" />; } else { + const onGroupHeaderItemClick = this.state.isUserMember ? this._onEditClick : null; const groupAvatarUrl = summary.profile ? summary.profile.avatar_url : null; const groupName = summary.profile ? summary.profile.name : null; avatarNode = ; if (summary.profile && summary.profile.name) { - nameNode =
+ nameNode =
{ summary.profile.name } ({ this.props.groupId })
; } else { - nameNode = { this.props.groupId }; + nameNode = { this.props.groupId }; } if (summary.profile && summary.profile.short_description) { - shortDescNode = { summary.profile.short_description }; + shortDescNode = { summary.profile.short_description }; } } if (this.state.editing) { @@ -996,6 +1000,7 @@ export default React.createClass({ const headerClasses = { mx_GroupView_header: true, mx_GroupView_header_view: !this.state.editing, + mx_GroupView_header_isUserMember: this.state.isUserMember, }; return (