mirror of
https://github.com/matrix-org/mjolnir.git
synced 2024-07-01 00:51:36 +00:00
Fix linter
This commit is contained in:
parent
fd2343dd28
commit
245b81262e
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user