22 lines
535 B
Go
22 lines
535 B
Go
package config
|
|
|
|
// ChatFrontEnd is one conversational front-end [chat] can enable. ID is its
|
|
// stable identifier.
|
|
type ChatFrontEnd struct {
|
|
ID string
|
|
Name string
|
|
Configured bool
|
|
}
|
|
|
|
// FrontEnds returns every chat front-end this configuration enables, in
|
|
// dashboard order. Whitespace-only values do not count as configured.
|
|
func (c ChatConfig) FrontEnds() []ChatFrontEnd {
|
|
return []ChatFrontEnd{
|
|
{
|
|
ID: "telegram",
|
|
Name: "Telegram",
|
|
Configured: c.Telegram.Token != (SecretRef{}),
|
|
},
|
|
}
|
|
}
|