Skip to content

Commit

Permalink
Merge pull request #5707 from vector-im/luke/allow-guest-view-group
Browse files Browse the repository at this point in the history
getGroupStore no longer needs a matrix client
  • Loading branch information
lukebarnard1 authored Nov 28, 2017
2 parents 58b7530 + bbdafef commit 63bedc4
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/components/structures/RightPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ module.exports = React.createClass({
return {
phase: this.props.groupId ? this.Phase.GroupMemberList : this.Phase.RoomMemberList,
isUserPrivilegedInGroup: null,
}
};
},

componentWillReceiveProps(newProps) {
Expand All @@ -139,9 +139,7 @@ module.exports = React.createClass({

_initGroupStore(groupId) {
if (!groupId) return;
this._groupStore = GroupStoreCache.getGroupStore(
this.context.matrixClient, groupId,
);
this._groupStore = GroupStoreCache.getGroupStore(groupId);
this._groupStore.registerListener(this.onGroupStoreUpdated);
},

Expand All @@ -151,7 +149,7 @@ module.exports = React.createClass({
}
},

onGroupStoreUpdated: function(){
onGroupStoreUpdated: function() {
this.setState({
isUserPrivilegedInGroup: this._groupStore.isUserPrivileged(),
});
Expand Down

0 comments on commit 63bedc4

Please sign in to comment.