slack-go / slack

Slack API in Go, originally by @nlopes; Maintainers needed, contact @parsley42
https://pkg.go.dev/github.com/slack-go/slack
BSD 2-Clause "Simplified" License
4.64k stars 1.13k forks source link

API returns "null" for file timestamp #1107

Closed rusq closed 2 years ago

rusq commented 2 years ago

What happened

API returns null for the file "timestamp" field (sample raw api output in the attached zip file)

bug109$ go run .                                                                                                                                           
2022/08/31 17:26:07 strconv.Atoi: parsing "null": invalid syntax
exit status 1

Expected behavior

Null values are expected to be treated gracefully.

Steps to reproduce

See attached zip file: json-unmarshal-issue.zip

reproducible code

See attached zip file: json-unmarshal-issue.zip

manifest.yaml

Yes, please.

Versions

Original issue: https://github.com/rusq/slackdump/issues/109

rusq commented 2 years ago

1106 fixes it, if merged

kanata2 commented 2 years ago

Thanks for reporting. I'll confirm later. (Please use Gist instead of zip😢)