diff --git a/chat_test.go b/chat_test.go index 524439520..7a549fa90 100644 --- a/chat_test.go +++ b/chat_test.go @@ -82,6 +82,14 @@ func TestPostMessage(t *testing.T) { blockStr := `[{"type":"context","block_id":"context","elements":[{"type":"plain_text","text":"hello"}]}]` tests := map[string]messageTest{ + "OnlyBasicProperties": { + endpoint: "/chat.postMessage", + opt: []MsgOption{}, + expected: url.Values{ + "channel": []string{"CXXX"}, + "token": []string{"testing-token"}, + }, + }, "Blocks": { endpoint: "/chat.postMessage", opt: []MsgOption{ diff --git a/conversation.go b/conversation.go index 299362601..e523716cc 100644 --- a/conversation.go +++ b/conversation.go @@ -571,12 +571,13 @@ func (api *Client) JoinConversationContext(ctx context.Context, channelID string } type GetConversationHistoryParameters struct { - ChannelID string - Cursor string - Inclusive bool - Latest string - Limit int - Oldest string + ChannelID string + Cursor string + Inclusive bool + Latest string + Limit int + Oldest string + IncludeAllMetadata bool } type GetConversationHistoryResponse struct { @@ -615,6 +616,11 @@ func (api *Client) GetConversationHistoryContext(ctx context.Context, params *Ge if params.Oldest != "" { values.Add("oldest", params.Oldest) } + if params.IncludeAllMetadata { + values.Add("include_all_metadata", "1") + } else { + values.Add("include_all_metadata", "0") + } response := GetConversationHistoryResponse{} diff --git a/messages.go b/messages.go index 828fa6026..333404563 100644 --- a/messages.go +++ b/messages.go @@ -129,7 +129,7 @@ type Msg struct { ReplaceOriginal bool `json:"replace_original"` DeleteOriginal bool `json:"delete_original"` - // Block type Message + // metadata Metadata SlackMetadata `json:"metadata,omitempty"` // Block type Message