From 741118d877518df663d6f162bffe385ece06d452 Mon Sep 17 00:00:00 2001 From: Dragory Date: Sun, 5 Aug 2018 01:43:31 +0300 Subject: [PATCH] !mutes fixes --- src/plugins/ModActions.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/ModActions.ts b/src/plugins/ModActions.ts index e76f3976..b1ecf914 100644 --- a/src/plugins/ModActions.ts +++ b/src/plugins/ModActions.ts @@ -497,13 +497,13 @@ export class ModActionsPlugin extends Plugin { if (a.expires_at == null && b.expires_at != null) return 1; if (b.expires_at == null && a.expires_at != null) return -1; if (a.expires_at == null && b.expires_at == null) { - return a.created_at > b.created_at ? 1 : -1; + return a.created_at > b.created_at ? -1 : 1; } return a.expires_at > b.expires_at ? 1 : -1; }); const caseIds = activeMutes.map(m => m.case_id).filter(v => !!v); - const cases = caseIds ? await this.cases.get(caseIds) : []; + const cases = caseIds.length ? await this.cases.get(caseIds) : []; const casesById = cases.reduce((map, c) => map.set(c.id, c), new Map()); lines.push(