Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interactions: parse AppInstalledTeamID #1073

Merged
merged 1 commit into from Jun 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions interactions_test.go
Expand Up @@ -68,7 +68,8 @@ const (
"text": "Select a date"
}
}
}]
}],
"app_installed_team_id": "T1ABCD2E12"
},
"api_app_id": "A123ABC",
"is_cleared": false
Expand Down Expand Up @@ -137,7 +138,8 @@ const (
}
}
}
}
},
"app_installed_team_id": "T1ABCD2E12"
},
"hash": "156663117.cd33ad1f",
"response_urls": [
Expand Down Expand Up @@ -221,6 +223,7 @@ func TestViewClosedck(t *testing.T) {
),
},
},
AppInstalledTeamID: "T1ABCD2E12",
},
APIAppID: "A123ABC",
}
Expand Down Expand Up @@ -297,6 +300,7 @@ func TestViewSubmissionCallback(t *testing.T) {
},
},
},
AppInstalledTeamID: "T1ABCD2E12",
},
ViewSubmissionCallback: ViewSubmissionCallback{
Hash: "156663117.cd33ad1f",
Expand Down
37 changes: 19 additions & 18 deletions views.go
Expand Up @@ -18,24 +18,25 @@ type ViewState struct {

type View struct {
SlackResponse
ID string `json:"id"`
TeamID string `json:"team_id"`
Type ViewType `json:"type"`
Title *TextBlockObject `json:"title"`
Close *TextBlockObject `json:"close"`
Submit *TextBlockObject `json:"submit"`
Blocks Blocks `json:"blocks"`
PrivateMetadata string `json:"private_metadata"`
CallbackID string `json:"callback_id"`
State *ViewState `json:"state"`
Hash string `json:"hash"`
ClearOnClose bool `json:"clear_on_close"`
NotifyOnClose bool `json:"notify_on_close"`
RootViewID string `json:"root_view_id"`
PreviousViewID string `json:"previous_view_id"`
AppID string `json:"app_id"`
ExternalID string `json:"external_id"`
BotID string `json:"bot_id"`
ID string `json:"id"`
TeamID string `json:"team_id"`
Type ViewType `json:"type"`
Title *TextBlockObject `json:"title"`
Close *TextBlockObject `json:"close"`
Submit *TextBlockObject `json:"submit"`
Blocks Blocks `json:"blocks"`
PrivateMetadata string `json:"private_metadata"`
CallbackID string `json:"callback_id"`
State *ViewState `json:"state"`
Hash string `json:"hash"`
ClearOnClose bool `json:"clear_on_close"`
NotifyOnClose bool `json:"notify_on_close"`
RootViewID string `json:"root_view_id"`
PreviousViewID string `json:"previous_view_id"`
AppID string `json:"app_id"`
ExternalID string `json:"external_id"`
BotID string `json:"bot_id"`
AppInstalledTeamID string `json:"app_installed_team_id"`
}

type ViewSubmissionCallbackResponseURL struct {
Expand Down