Skip to content

GetConversationInfo Properties response shape is invalid #1423

@jacob-winkler

Description

@jacob-winkler

What happened

The response shape is not valid with the current slack API response

// Channel contains information about the channel
type Channel struct {
	GroupConversation
	IsChannel  bool        `json:"is_channel"`
	IsGeneral  bool        `json:"is_general"`
	IsMember   bool        `json:"is_member"`
	Locale     string      `json:"locale"`
	Properties *Properties `json:"properties"`
}

type Properties struct {
	Canvas Canvas `json:"canvas"`
}

type Canvas struct {
	FileId       string `json:"file_id"`
	IsEmpty      bool   `json:"is_empty"`
	QuipThreadId string `json:"quip_thread_id"`
}

Expected behavior

// Channel contains information about the channel
type Channel struct {
	GroupConversation
	IsChannel  bool        `json:"is_channel"`
	IsGeneral  bool        `json:"is_general"`
	IsMember   bool        `json:"is_member"`
	Locale     string      `json:"locale"`
	Properties *Properties `json:"properties"`
}

type Properties struct {
	Tabs []Tab `json:"tabs"`
}

type Tab struct {
	Id string `json:"id"`
        Label string `json:"label"` 
        Type string `json:"type"`
        Data Data `json:"data"`
}

type Data struct {
	FileId string `json:"file_id"`
        SharedTs string `json:"shared_ts"`
}

Steps to reproduce

See response shape from official slack docs
https://api.slack.com/methods/conversations.info

Metadata

Metadata

Assignees

Labels

bug[issue] bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions