metadata: allow disabling channel memebr sync

Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
This commit is contained in:
Sumner Evans
2024-07-17 22:24:32 -06:00
parent a0d88da480
commit fe550da243
3 changed files with 23 additions and 15 deletions
+4 -4
View File
@@ -15,9 +15,9 @@ import (
var _ bridgev2.ConfigValidatingNetwork = (*TelegramConnector)(nil)
type MemberListConfig struct {
MaxInitialSync int `yaml:"max_initial_sync"`
SyncChannels bool `yaml:"sync_channels"`
SkipDeleted bool `yaml:"skip_deleted"`
MaxInitialSync int `yaml:"max_initial_sync"`
SyncBroadcastChannels bool `yaml:"sync_broadcast_channels"`
SkipDeleted bool `yaml:"skip_deleted"`
}
func (c MemberListConfig) NormalizedMaxInitialSync() int {
@@ -54,7 +54,7 @@ func upgradeConfig(helper up.Helper) {
helper.Copy(up.Int, "animated_sticker", "args", "height")
helper.Copy(up.Int, "animated_sticker", "args", "fps")
helper.Copy(up.Int, "member_list", "max_initial_sync")
helper.Copy(up.Bool, "member_list", "sync_channels")
helper.Copy(up.Bool, "member_list", "sync_broadcast_channels")
helper.Copy(up.Bool, "member_list", "skip_deleted")
helper.Copy(up.Int, "max_member_count")
}