Mutes: fix mutes/unmutes sometimes not applying/removing the role
This commit is contained in:
parent
66d6642bc6
commit
09464e56e3
1 changed files with 2 additions and 2 deletions
|
@ -139,7 +139,7 @@ export class MutesPlugin extends ZeppelinPlugin<TConfigSchema> {
|
||||||
}
|
}
|
||||||
|
|
||||||
const user = await this.resolveUser(userId);
|
const user = await this.resolveUser(userId);
|
||||||
const member = await this.getMember(user.id);
|
const member = await this.getMember(user.id, true); // Grab the fresh member so we don't have stale role info
|
||||||
|
|
||||||
if (member) {
|
if (member) {
|
||||||
// Apply mute role if it's missing
|
// Apply mute role if it's missing
|
||||||
|
@ -264,7 +264,7 @@ export class MutesPlugin extends ZeppelinPlugin<TConfigSchema> {
|
||||||
if (!existingMute) return;
|
if (!existingMute) return;
|
||||||
|
|
||||||
const user = await this.resolveUser(userId);
|
const user = await this.resolveUser(userId);
|
||||||
const member = await this.getMember(userId);
|
const member = await this.getMember(userId, true); // Grab the fresh member so we don't have stale role info
|
||||||
|
|
||||||
if (unmuteTime) {
|
if (unmuteTime) {
|
||||||
// Schedule timed unmute (= just set the mute's duration)
|
// Schedule timed unmute (= just set the mute's duration)
|
||||||
|
|
Loading…
Add table
Reference in a new issue