getFeishuConfig extracts the Feishu configuration from the AppIMSetting.
(setting *storepb.AppIMSetting)
| 21 | |
| 22 | // getFeishuConfig extracts the Feishu configuration from the AppIMSetting. |
| 23 | func getFeishuConfig(setting *storepb.AppIMSetting) *storepb.AppIMSetting_Feishu { |
| 24 | if setting == nil { |
| 25 | return nil |
| 26 | } |
| 27 | for _, s := range setting.Settings { |
| 28 | if s.Type == storepb.WebhookType_FEISHU { |
| 29 | return s.GetFeishu() |
| 30 | } |
| 31 | } |
| 32 | return nil |
| 33 | } |
| 34 | |
| 35 | // WebhookResponse is the API message for Feishu webhook response. |
| 36 | type WebhookResponse struct { |
no test coverage detected