fix: show password protected channels

This commit is contained in:
illusia committed 2026-10-12 10:34:06 +08:00
1 parent ff508a8eb9
commit cec2a81549
23 files changed
+189 -27

No files matched your search

+1
View File
@@ -72,6 +72,7 @@ function channel(value: unknown): value is ChannelInfo {
&& text(value.name) && optional(value.order, text) && optional(value.description, text)
&& optional(value.maxClients, maximum => finite(maximum) && Number.isInteger(maximum) && maximum >= 0 && maximum <= 65_535)
&& optional(value.maxClientsLimited, boolean)
&& optional(value.passwordProtected, boolean)
&& (value.maxClients === undefined) === (value.maxClientsLimited === undefined)
&& optional(value.members, members => arrayOf(members, member));
}