mirror of
https://github.com/matrix-org/mjolnir.git
synced 2024-10-01 01:36:06 -04: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 {
|
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() {
|
constructor() {
|
||||||
}
|
}
|
||||||
@ -65,8 +65,8 @@ export class BasicFlooding implements IProtection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Trim the oldest messages off the user's history if it's getting large
|
// Trim the oldest messages off the user's history if it's getting large
|
||||||
if (forUser.length > MAX_PER_MINUTE*2) {
|
if (forUser.length > MAX_PER_MINUTE * 2) {
|
||||||
forUser.splice(0, forUser.length - (MAX_PER_MINUTE*2) - 1);
|
forUser.splice(0, forUser.length - (MAX_PER_MINUTE * 2) - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user