Remove dead & duplicated code (#11405)

* Remove dead code

* Make dead code happier

* DRY pickle additional data calculation

* Iterate
This commit is contained in:
Michael Telatynski
2023-08-15 08:43:15 +00:00
committed by GitHub
parent 672ad98ec7
commit 27d79458da
25 changed files with 50 additions and 201 deletions
-4
View File
@@ -63,10 +63,6 @@ export class BanList {
return this._rules.filter((r) => r.kind === RULE_USER);
}
public get roomRules(): ListRule[] {
return this._rules.filter((r) => r.kind === RULE_ROOM);
}
public async banEntity(kind: string, entity: string, reason: string): Promise<any> {
const type = ruleTypeToStable(kind);
if (!type) return; // unknown rule type