mirror of
https://github.com/YspCoder/clawgo.git
synced 2026-05-18 07:07:32 +08:00
hide unavailable channels in webui
This commit is contained in:
30
pkg/channels/compiled_channels.go
Normal file
30
pkg/channels/compiled_channels.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package channels
|
||||
|
||||
import "sort"
|
||||
|
||||
func CompiledChannelKeys() []string {
|
||||
out := make([]string, 0, 7)
|
||||
if telegramCompiled {
|
||||
out = append(out, "telegram")
|
||||
}
|
||||
if whatsappCompiled {
|
||||
out = append(out, "whatsapp")
|
||||
}
|
||||
if discordCompiled {
|
||||
out = append(out, "discord")
|
||||
}
|
||||
if feishuCompiled {
|
||||
out = append(out, "feishu")
|
||||
}
|
||||
if qqCompiled {
|
||||
out = append(out, "qq")
|
||||
}
|
||||
if dingtalkCompiled {
|
||||
out = append(out, "dingtalk")
|
||||
}
|
||||
if maixcamCompiled {
|
||||
out = append(out, "maixcam")
|
||||
}
|
||||
sort.Strings(out)
|
||||
return out
|
||||
}
|
||||
Reference in New Issue
Block a user