Address code smells from #30453 (#31083)

* check recents length

* Improve sorting logic in capabilities dialog

* Fix allowedHosts regex array check

* Remove double negative in filter checks

* prettier
This commit is contained in:
David Langley
2025-10-29 08:52:17 +00:00
committed by GitHub
parent 3e809cd661
commit 80a7de4314
7 changed files with 207 additions and 11 deletions

View File

@@ -217,7 +217,7 @@ export class RoomPermalinkCreator {
const allowed = aclEvent.getContent<{ allow: string[] }>().allow;
allowedHostsRegexps = []; // we don't want to use the default rule here
if (Array.isArray(denied)) {
if (Array.isArray(allowed)) {
allowed.forEach((h) => allowedHostsRegexps.push(getRegex(h)));
}
}