fix: seed去重按platform type而非config name — 消除重复obv11 stub
This commit is contained in:
@@ -485,9 +485,13 @@ func createAdapters(cfg *config.Config, store *config.Store) []bridge.PlatformAd
|
||||
}
|
||||
|
||||
// Seed default adapters for platforms that have no stored config.
|
||||
seededTypes := map[string]bool{}
|
||||
for _, a := range adapters {
|
||||
seededTypes[a.PlatformName()] = true
|
||||
}
|
||||
defaultPlatforms := []string{"obv11", "telegram", "webhook", "wechat", "feishu", "discord"}
|
||||
for _, name := range defaultPlatforms {
|
||||
if seen[name] {
|
||||
if seen[name] || seededTypes[name] {
|
||||
continue
|
||||
}
|
||||
fields := mergeFields(cfg, name, nil)
|
||||
|
||||
Reference in New Issue
Block a user