diff --git a/internal/infrastructure/controlplanestore/telegram_connection.go b/internal/infrastructure/controlplanestore/telegram_connection.go index 9274ac941..eee4468c0 100644 --- a/internal/infrastructure/controlplanestore/telegram_connection.go +++ b/internal/infrastructure/controlplanestore/telegram_connection.go @@ -100,6 +100,9 @@ func splitLegacyChannelSettings(orgID string, stored []byte) (rewritten []byte, return nil, telegramConnection{}, false, fmt.Errorf("decode telegram: %w", err) } delete(doc, "telegram") + // A document old enough to carry telegram can also carry the per-channel + // models that model aliases replaced, which the current schema rejects. + delete(doc, "models") if orgID == storecontract.DefaultOrgID { moved = telegramConnection{Token: legacy.TokenRef, Users: legacy.AllowedUserIDs} } else if len(legacy.AllowedUserIDs) > 0 {