fix: timeout mutes always being applied for 28d
They were still being removed by the bot after the real mute time, but the native timeout was always set to 28d.
This commit is contained in:
parent
c136c117d2
commit
0e58301dc8
1 changed files with 1 additions and 1 deletions
|
@ -7,7 +7,7 @@ import { MAX_TIMEOUT_DURATION } from "../../../data/Mutes";
|
|||
* @return - Timeout expiry timestamp
|
||||
*/
|
||||
export function getTimeoutExpiryTime(muteExpiresAt: number | null | undefined): number {
|
||||
if (muteExpiresAt && muteExpiresAt <= MAX_TIMEOUT_DURATION) {
|
||||
if (muteExpiresAt && muteExpiresAt - Date.now() <= MAX_TIMEOUT_DURATION) {
|
||||
return muteExpiresAt;
|
||||
}
|
||||
return Date.now() + MAX_TIMEOUT_DURATION;
|
||||
|
|
Loading…
Add table
Reference in a new issue