FIX: update `can_see_members` attribute after leaving a group. (#15982)

After leaving a group, it is trying to reload its member list. Previously, when the members_visibility_level attribute has a value of 2 or higher, it displayed an error popup since the can_see_members attribute was not updated.
This commit is contained in:
Vinoth Kannan 2022-02-17 23:07:59 +05:30 committed by GitHub
parent 9249e98697
commit 45c404a6c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -124,6 +124,7 @@ const Group = RestModel.extend({
await ajax(`/groups/${this.id}/leave.json`, {
type: "DELETE",
});
this.set("can_see_members", this.members_visibility_level < 2);
await this.reloadMembers({}, true);
},