3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-18 15:45:03 +00:00

ReactionRoles: only clear pendingRoleChanges for a member after their roles have been applied

This commit is contained in:
Dragory 2020-06-04 21:41:35 +03:00
parent c6a633f3a6
commit 4a707fcf05

View file

@ -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();
}, },
}; };