mirror of
https://github.com/vector-im/element-web.git
synced 2025-11-03 09:41:35 +01:00
Merge pull request #4633 from matrix-org/t3chguy/group-view-guest
fix viewGroup to actually show the group if possible
This commit is contained in:
commit
a64de63f00
@ -932,9 +932,20 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
|
||||
});
|
||||
}
|
||||
|
||||
private viewGroup(payload) {
|
||||
private async viewGroup(payload) {
|
||||
const groupId = payload.group_id;
|
||||
|
||||
// Wait for the first sync to complete
|
||||
if (!this.firstSyncComplete) {
|
||||
if (!this.firstSyncPromise) {
|
||||
console.warn('Cannot view a group before first sync. group_id:', groupId);
|
||||
return;
|
||||
}
|
||||
await this.firstSyncPromise.promise;
|
||||
}
|
||||
|
||||
this.setState({
|
||||
view: Views.LOGGED_IN,
|
||||
currentGroupId: groupId,
|
||||
currentGroupIsNew: payload.group_is_new,
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user