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

API returns int64 for "timestamp" in RichTextSectionDateElement. #1104

Closed
rusq opened this issue Aug 29, 2022 · 3 comments · Fixed by #1131
Closed

API returns int64 for "timestamp" in RichTextSectionDateElement. #1104

rusq opened this issue Aug 29, 2022 · 3 comments · Fixed by #1131
Labels
bug [issue] bug

Comments

@rusq
Copy link
Contributor

rusq commented Aug 29, 2022

What happened

API returns timestamp as int64 type for "RichTextSectionDateElement" and json parsing fails.

Expected behavior

The API response is correctly Unmarshalled into RichTextSectionDateElement.

Steps to reproduce

Attached is the archive with the API output and a main.go program that, if executed, reproduces the error.

The attached archive contains also bug119-r.json which is the raw output from the API with the PII removed.

reproducible code

rich_text_date_issue.zip

manifest.yaml

manifest WHO?

Versions

  • Go: go version go1.19 darwin/amd64
  • slack-go/slack: v0.11.2

Comments

I'm not sure how to go about this - has there been an instance where timestamp is string for this RichText block element?

Original issue link: rusq/slackdump#119

@rusq
Copy link
Contributor Author

rusq commented Aug 29, 2022

Possibly JSONTime will do the trick? (an additional branch for when input is a number would be needed)

@rusq
Copy link
Contributor Author

rusq commented Oct 22, 2022

Hey team, any chance this can be looked at?

@kanata2 kanata2 linked a pull request Dec 11, 2022 that will close this issue
@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.

2 participants