Closed joe-askattest closed 6 years ago
what do you do to make priority return a float? slack's schema says it should also be an integer https://github.com/slackapi/slack-api-specs/blob/master/web-api/slack_web_openapi_v2.json#L206
I'm not sure. We have a channel which I added our bot to, and when I added it the slack-api
stopped working. It was failing on login when it was using Serde to parse the JSON. I looked at a dump of the JSON and the new channel the bot had been added to had a priority with a floating point value. I don't remember the exact value. It was something like 0.02032.
I had presumed that it was the slack-api
that had gotten it wrong.
I could spend more time investigating it and seeing if I can reproduce it.
Odd the rtmStart returns a response which includes a list of all channels, not sure why adding the bot to one would change anything. Assuming it worked before that.
I can't see any docs for priority other than it being mentioned in example responses as 0 and the openapi saying integer.
Can't see how it would ever get set
As a guess, the reason it wasn’t zero on this particular channel is because the bot had just been added to it. All of the other channels had 0 for the priority. That’s what I had presumed.
I will look into recreating this during the week.
I'll get this reflected in the next update to the specs and update it in the upstream schemas, thank you. Right now it may be best to just ignore the field in your own usage, as it doesn't relate to any publicly released features.
Great I'll merge this then
The
priority
is set to aninteger
, but actually it's anumber
as it can be a floating point value.So it's updated.