Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

json: cannot unmarshal number into Go struct field Message.messages.blocks of type string for GetConversationHistory #1123

Closed
kim-barker opened this issue Nov 4, 2022 · 2 comments · Fixed by #1131
Labels
bug [issue] bug

Comments

@kim-barker
Copy link

kim-barker commented Nov 4, 2022

What happened

GetConversationHistory returns the following error:
json: cannot unmarshal number into Go struct field Message.messages.blocks of type string

Expected behavior

Steps to reproduce

Use conversation with date Slack block that includes timestamp

{
    "type": "date",
    "timestamp": 1666933200,
    "format": "{date} at {time}",
    "fallback": "not available",
    "style": {
        "bold": true
    }
},

reproducible code

api := slack.New("YOUR_TOKEN")
resp, err := api.GetConversationHistory(&slack.GetConversationHistoryParameters{
    ChannelID: "ChannelID",
    Inclusive: true,
    Limit:     1,
    Oldest:    "timestamp_of_message_above",
})

manifest.yaml

Versions

  • Go:
  • slack-go/slack:
@Niraj-Fonseka
Copy link

➕ getting the same error

@kanata2
Copy link
Member

kanata2 commented Dec 11, 2022

It will be fixed in v0.12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [issue] bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants