Skip to content

Commit 462e653

Browse files
srtaalejzimeg
andauthored
Apply suggestions from code review
Co-authored-by: Eden Zimbelman <zim@o526.net>
1 parent 27ba074 commit 462e653

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

internal/api/icon.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import (
3636
const (
3737
appIconMethod = "apps.hosted.icon"
3838
// AppIconSetMethod is the API method for setting app icons for non-hosted apps.
39-
AppIconSetMethod = "apps.icon.set"
39+
appIconSetMethod = "apps.icon.set"
4040
)
4141

4242
// IconResult details to be saved
@@ -48,7 +48,8 @@ type iconResponse struct {
4848
IconResult
4949
}
5050

51-
// Icon updates a Slack App's icon
51+
// Icon updates a hosted Slack app icon
52+
// DEPRECATED: Prefer "IconSet" instead
5253
func (c *Client) Icon(ctx context.Context, fs afero.Fs, token, appID, iconFilePath string) (IconResult, error) {
5354
return c.uploadIcon(ctx, fs, token, appID, iconFilePath, appIconMethod, "file")
5455
}

internal/pkg/apps/install.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ func updateIcon(ctx context.Context, clients *shared.ClientFactory, iconPath, ap
660660

661661
// var iconResp apiclient.IconResult
662662
var err error
663-
_, err = clients.API().Icon(ctx, clients.Fs, token, appID, iconPath)
663+
_, err = clients.API().SetIcon(ctx, clients.Fs, token, appID, iconPath)
664664
if err != nil {
665665
// TODO: separate the icon upload into a different function because if an error is returned
666666
// the new app_id might be ignored and next time we'll create another app.

0 commit comments

Comments
 (0)