ReactionRoles: only clear pendingRoleChanges for a member after their roles have been applied
This commit is contained in:
parent
cc69bc5be4
commit
ff4c934ca3
1 changed files with 1 additions and 2 deletions
|
@ -189,8 +189,6 @@ export class ReactionRolesPlugin extends ZeppelinPlugin<TConfigSchema> {
|
||||||
timeout: null,
|
timeout: null,
|
||||||
changes: [],
|
changes: [],
|
||||||
applyFn: async () => {
|
applyFn: async () => {
|
||||||
this.pendingRoleChanges.delete(memberId);
|
|
||||||
|
|
||||||
const lock = await this.locks.acquire(`member-roles-${memberId}`);
|
const lock = await this.locks.acquire(`member-roles-${memberId}`);
|
||||||
|
|
||||||
const member = await this.getMember(memberId);
|
const member = await this.getMember(memberId);
|
||||||
|
@ -212,6 +210,7 @@ export class ReactionRolesPlugin extends ZeppelinPlugin<TConfigSchema> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.pendingRoleChanges.delete(memberId);
|
||||||
lock.unlock();
|
lock.unlock();
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue