connector: handle supergroup upgrades (#118)
Co-authored-by: Tulir Asokan <tulir@maunium.net>
This commit is contained in:
@@ -82,6 +82,8 @@ type TelegramConfig struct {
|
||||
AlwaysCustomEmojiReaction bool `yaml:"always_custom_emoji_reaction"`
|
||||
|
||||
SavedMessagesAvatar id.ContentURIString `yaml:"saved_message_avatar"`
|
||||
|
||||
AlwaysTombstoneOnSupergroupMigration bool `yaml:"always_tombstone_on_supergroup_migration"`
|
||||
}
|
||||
|
||||
func (c TelegramConfig) ShouldBridge(participantCount int) bool {
|
||||
@@ -120,6 +122,7 @@ func upgradeConfig(helper up.Helper) {
|
||||
helper.Copy(up.Bool, "sync", "direct_chats")
|
||||
helper.Copy(up.Bool, "always_custom_emoji_reaction")
|
||||
helper.Copy(up.Str, "saved_message_avatar")
|
||||
helper.Copy(up.Bool, "always_tombstone_on_supergroup_migration")
|
||||
}
|
||||
|
||||
func (tg *TelegramConnector) GetConfig() (example string, data any, upgrader up.Upgrader) {
|
||||
|
||||
Reference in New Issue
Block a user