getTeamsConfig extracts the Teams configuration from the AppIMSetting.
(setting *storepb.AppIMSetting)
| 32 | |
| 33 | // getTeamsConfig extracts the Teams configuration from the AppIMSetting. |
| 34 | func getTeamsConfig(setting *storepb.AppIMSetting) *storepb.AppIMSetting_Teams { |
| 35 | if setting == nil { |
| 36 | return nil |
| 37 | } |
| 38 | for _, s := range setting.Settings { |
| 39 | if s.Type == storepb.WebhookType_TEAMS { |
| 40 | return s.GetTeams() |
| 41 | } |
| 42 | } |
| 43 | return nil |
| 44 | } |
| 45 | |
| 46 | // WebhookActionTarget is the API message for Teams webhook action target. |
| 47 | type WebhookActionTarget struct { |
no test coverage detected