feat(kaak): show channel occupancy limits

This commit is contained in:
Corrupted ILLUSIA committed 2026-10-10 22:25:01 +08:00
1 parent 387462d89a
commit a3bf476db6
23 files changed
+244 -20

No files matched your search

+3
View File
@@ -60,6 +60,9 @@ function member(value: unknown): value is ChannelMember {
function channel(value: unknown): value is ChannelInfo {
return isRecord(value) && text(value.id) && channelId(value.id) && text(value.parentID) && channelId(value.parentID)
&& 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)
&& (value.maxClients === undefined) === (value.maxClientsLimited === undefined)
&& optional(value.members, members => arrayOf(members, member));
}