Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions internal/shared/types/app_manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ type AppFeatures struct {
ManifestSlashCommandsItems []ManifestSlashCommandsItem `json:"slash_commands,omitempty" yaml:"slash_commands,flow,omitempty"`
Search *Search `json:"search,omitempty" yaml:"search,flow,omitempty"`
RichPreviews *RichPreviews `json:"rich_previews,omitempty" yaml:"rich_previews,flow,omitempty"`
CodeChannels *RawJSON `json:"code_channels,omitempty" yaml:"code_channels,flow,omitempty"`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👁️‍🗨️ question: Should we extend values for code_channels to include the following or are these values sometimes changed?:

type CodeChannels struct {
	Enabled         *bool  `json:"enabled,omitempty" yaml:"enabled,omitempty"`
	SlashCommandURL string `json:"slash_command_url,omitempty" yaml:"slash_command_url,omitempty"`
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add it as a RawJSON passthrough so any future sub-fields survive without further struct changes.

🌚 note: Am open to this as well but think we benefit from strict structures overall after stable API releases!

}

type RichPreviews struct {
Expand Down
9 changes: 9 additions & 0 deletions internal/shared/types/app_manifest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,15 @@ func Test_AppManifest_AppFeatures(t *testing.T) {
},
want: `{"app_home":{},"bot_user":{"display_name":"business_bot"},"rich_previews":{"entity_types":["slack#/entities/file"]}}`,
},
"includes code channels when provided": {
features: AppFeatures{
BotUser: BotUser{
DisplayName: "codebot",
},
CodeChannels: ToRawJSON(`{"enabled":true}`),
},
want: `{"app_home":{},"bot_user":{"display_name":"codebot"},"code_channels":{"enabled":true}}`,
},
}
for name, tc := range tests {
t.Run(name, func(t *testing.T) {
Expand Down
Loading