metadata: refactor getting chat info

Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
This commit is contained in:
Sumner Evans
2024-07-17 15:26:34 -06:00
parent 9d77bebe3e
commit ec56fb6b28
3 changed files with 140 additions and 123 deletions
+4
View File
@@ -29,6 +29,10 @@ type TelegramConfig struct {
MaxMemberCount int `yaml:"max_member_count"`
}
func (c TelegramConfig) ShouldBridge(participantCount int) bool {
return c.MaxMemberCount < 0 || participantCount <= c.MaxMemberCount
}
//go:embed example-config.yaml
var ExampleConfig string