getDingTalkConfig extracts the DingTalk configuration from the AppIMSetting.
(setting *storepb.AppIMSetting)
| 25 | |
| 26 | // getDingTalkConfig extracts the DingTalk configuration from the AppIMSetting. |
| 27 | func getDingTalkConfig(setting *storepb.AppIMSetting) *storepb.AppIMSetting_DingTalk { |
| 28 | if setting == nil { |
| 29 | return nil |
| 30 | } |
| 31 | for _, s := range setting.Settings { |
| 32 | if s.Type == storepb.WebhookType_DINGTALK { |
| 33 | return s.GetDingtalk() |
| 34 | } |
| 35 | } |
| 36 | return nil |
| 37 | } |
| 38 | |
| 39 | // Response is the API message for DingTalk webhook response. |
| 40 | type Response struct { |
no test coverage detected