From 245b81262ef32042b8affbfebbcd93ae3de0a092 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 4 Dec 2019 19:28:49 -0700 Subject: [PATCH] Fix linter --- src/protections/BasicFlooding.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/protections/BasicFlooding.ts b/src/protections/BasicFlooding.ts index fc44ad5..7014014 100644 --- a/src/protections/BasicFlooding.ts +++ b/src/protections/BasicFlooding.ts @@ -24,7 +24,7 @@ const TIMESTAMP_THRESHOLD = 30000; // 30s out of phase export class BasicFlooding implements IProtection { - public lastEvents: { [roomId: string]: {[userId: string]: {originServerTs: number, eventId: string}[]} } = {}; + public lastEvents: { [roomId: string]: { [userId: string]: { originServerTs: number, eventId: string }[] } } = {}; constructor() { } @@ -65,8 +65,8 @@ export class BasicFlooding implements IProtection { } // Trim the oldest messages off the user's history if it's getting large - if (forUser.length > MAX_PER_MINUTE*2) { - forUser.splice(0, forUser.length - (MAX_PER_MINUTE*2) - 1); + if (forUser.length > MAX_PER_MINUTE * 2) { + forUser.splice(0, forUser.length - (MAX_PER_MINUTE * 2) - 1); } } }