Skip to content

Commit

Permalink
parse app_installed_team_id during view_submision and view_closed events
Browse files Browse the repository at this point in the history
  • Loading branch information
7ail committed Jun 4, 2022
1 parent 8db8a65 commit 97df436
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 20 deletions.
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

0 comments on commit 97df436

Please sign in to comment.