Closed clux closed 4 years ago
Do you know what type that was on? They vary if they're string or they're floats. I wonder if they're just wrong here in some places or slack are changing things
Oh sorry you say that's channel info.
Yeah, the ts
type seems to vary, which is the strange thing. Maybe it's a slack api bug?
Ultimately, have been building from a fork where the latest message on channel info has been commented out. Not sure how to deal with that type of inconsistency using serde.
There's a PR about trying to fix these time stamps. I think it's just a mistake on slacks part that is now hard to change
JS has limited float precious so perhaps these comeback as strings sometime to preserve precision for other languages
this is fixed by the new Timestamp type https://github.com/slack-rs/slack-rs-api/releases/tag/v0.23.0
Can happen when the
latest
message has ats
formatted as a string:but types.rs encodes it as:
leading to:
JSON error - MalformedResponse(Error("invalid type: string \"1570109136.344300\", expected f32", line: 1, column: 2342))