diff --git a/internal/shared/types/team.go b/internal/shared/types/team.go index 8d475920..78fade1e 100644 --- a/internal/shared/types/team.go +++ b/internal/shared/types/team.go @@ -40,7 +40,7 @@ type TeamInfo struct { Name string `json:"name"` } -// IsTeamID returns true if matches the pattern of a workspace (T-prefixed) team ID +// IsWorkspaceTeamID returns true if a string matches the pattern of a workspace (T-prefixed) team ID // Note: This criteria is an estimate, and not directly related to server-side team_id scheme func IsWorkspaceTeamID(str string) bool { return strings.HasPrefix(str, "T") && strings.ToUpper(str) == str @@ -51,9 +51,3 @@ func IsWorkspaceTeamID(str string) bool { func IsEnterpriseTeamID(str string) bool { return strings.HasPrefix(str, "E") && strings.ToUpper(str) == str } - -// IsTeamID returns true if a string matches the pattern of a team id -// Note: Validation criteria is an estimate, and not directly related to server-side team_id scheme -func IsTeamID(str string) bool { - return IsEnterpriseTeamID(str) || IsWorkspaceTeamID(str) -} diff --git a/internal/shared/types/team_test.go b/internal/shared/types/team_test.go index f9f60c28..33b05a56 100644 --- a/internal/shared/types/team_test.go +++ b/internal/shared/types/team_test.go @@ -59,7 +59,4 @@ func Test_SlackTeam_Team_Workspace_Enterprise_Identifiers(t *testing.T) { require.Equal(t, true, IsWorkspaceTeamID(validWorkspaceTeamID), "Workspace team ID should pass as workspace team ID") require.Equal(t, false, IsWorkspaceTeamID(validEnterpriseID), "Enterprise ID should NOT pass as workspace team ID") - - require.Equal(t, true, IsTeamID(validEnterpriseID), "Enterprise ID should pass as a team ID") - require.Equal(t, true, IsTeamID(validWorkspaceTeamID), "Workspace ID should pass as team ID") }