diff --git a/pkg/connector/config.go b/pkg/connector/config.go index 6938f187..819f605b 100644 --- a/pkg/connector/config.go +++ b/pkg/connector/config.go @@ -98,7 +98,17 @@ func upgradeConfig(helper up.Helper) { } func (tg *TelegramConnector) GetConfig() (example string, data any, upgrader up.Upgrader) { - return ExampleConfig, tg.Config, up.SimpleUpgrader(upgradeConfig) + return ExampleConfig, tg.Config, &up.StructUpgrader{ + SimpleUpgrader: up.SimpleUpgrader(upgradeConfig), + Blocks: [][]string{ + {"device_info"}, + {"animated_sticker"}, + {"member_list"}, + {"ping"}, + {"sync"}, + }, + Base: ExampleConfig, + } } func (tg *TelegramConnector) ValidateConfig() error { diff --git a/pkg/connector/example-config.yaml b/pkg/connector/example-config.yaml index b51d9466..526834d2 100644 --- a/pkg/connector/example-config.yaml +++ b/pkg/connector/example-config.yaml @@ -2,6 +2,7 @@ api_id: 12345 api_hash: tjyd5yge35lbodk1xwzw2jstp90k55qz +# Device info shown in the Telegram device list. device_info: device_model: mautrix-telegram system_version: @@ -37,17 +38,14 @@ member_list: # # -1 means no limit (which means it's limited to 10000 by the server) max_initial_sync: 100 - # Whether or not to sync the member list in broadcast channels. If # disabled, members will still be synced when they send messages. # # If no channel admins have logged into the bridge, the bridge won't be # able to sync the member list regardless of this setting. sync_broadcast_channels: false - # Whether or not to skip deleted members when syncing members. skip_deleted: true - # Maximum number of participants in chats to bridge. Only applies when the # portal is being created. If there are more members when trying to create a # room, the room creation will be cancelled.