fix wechat issue (#1293)

This commit is contained in:
ranbochen 2018-03-20 19:21:19 +08:00 committed by stuart nelson
parent bd04da5480
commit b4048f46bc
1 changed files with 4 additions and 0 deletions

View File

@ -266,6 +266,10 @@ func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error {
} }
} }
for _, wcc := range rcv.WechatConfigs { for _, wcc := range rcv.WechatConfigs {
if wcc.HTTPConfig == nil {
wcc.HTTPConfig = c.Global.HTTPConfig
}
if wcc.APIURL == "" { if wcc.APIURL == "" {
if c.Global.WeChatAPIURL == "" { if c.Global.WeChatAPIURL == "" {
return fmt.Errorf("no global Wechat URL set") return fmt.Errorf("no global Wechat URL set")