Merge pull request #1938 from huaaudio/fix/weixin-load

fix weixin config loading incorrectly
This commit is contained in:
美電球
2026-03-24 08:37:34 +08:00
committed by GitHub
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -1546,7 +1546,7 @@ func applySecurityConfig(cfg *Config, sec *SecurityConfig) error {
// Handle Weixin token
if sec.Channels.Weixin != nil && sec.Channels.Weixin.Token != "" {
cfg.Channels.Discord.token = sec.Channels.Discord.Token
cfg.Channels.Weixin.token = sec.Channels.Weixin.Token
}
// Handle DingTalk client secret
+3 -1
View File
@@ -113,7 +113,9 @@ func NewProvider(ctx context.Context, opts ...Option) (*Provider, error) {
// Validate region is set - required for Bedrock request signing
if cfg.Region == "" {
return nil, fmt.Errorf("AWS region not configured: set AWS_REGION, AWS_DEFAULT_REGION, or use WithRegion option")
return nil, fmt.Errorf(
"AWS region not configured: set AWS_REGION, AWS_DEFAULT_REGION, or use WithRegion option",
)
}
// Build client options