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

Unable to parse reactions #111

Open
tbrand opened this issue Jan 10, 2019 · 8 comments · May be fixed by slack-rs/slack-rs-api#71 or slack-rs/slack-api-schemas#15
Open

Unable to parse reactions #111

tbrand opened this issue Jan 10, 2019 · 8 comments · May be fixed by slack-rs/slack-rs-api#71 or slack-rs/slack-api-schemas#15

Comments

@tbrand
Copy link

tbrand commented Jan 10, 2019

Hi there. Appreciate for the good works!

I've tried this crate and it almost works fine! 👍
One thing, it raises an error when it's received reactions.

Unable to deserialize slack message, error: Json Error: Error("missing field `message`", line: 0, column: 0): json: {"type":"reaction_added","user":"U69XXXXXX","item":{"type":"message","channel":"C6XXXXXXX","ts":"1547099852.002900"},"reaction":"+1","i
tem_user":"U69XXXXXX","event_ts":"1547112278.003200","ts":"1547112278.003200"}

Could you fix this?

Regards.

@dten
Copy link
Contributor

dten commented Jan 10, 2019

Hey thanks for the report. I'm not getting the same error. Is there anything different about the reaction or is it happening everywhere.

@tbrand
Copy link
Author

tbrand commented Jan 15, 2019

Sorry for the late reply. I was sick. 😷

I did digging the code an I found a bug? in slack_api's code.
https://docs.rs/slack_api/0.21.0/slack_api/reactions/struct.ListResponseItemMessage.html
The ListResponseItemMessage contains 'message' field but the payload doesn't contain it as you can see on my previous comment.

Where should I send a feedback of this? (I couldn't find a repository of slack_api.)

@dten
Copy link
Contributor

dten commented Jan 16, 2019

perhaps this has changed? not sure. I have the error now 👍 i think we're also not handling reactions added to files etc properly.
https://api.slack.com/events/reaction_added

@tbrand
Copy link
Author

tbrand commented Jan 16, 2019

Yeah it could be changed. They change APIs frequently. 😭

@dten
Copy link
Contributor

dten commented Jan 16, 2019

yea more things need to be optional to cope with this 💃

@tbrand
Copy link
Author

tbrand commented Jan 23, 2019

So any plan to fix this? 🙏

@dten
Copy link
Contributor

dten commented Jan 23, 2019

Yea plans. Just been busy.

@mlbright
Copy link

When I match on the Event::ReactionAdded I don't get anything, but for some reason the reaction_added event matches on Event::PrefChange.

bobrippling added a commit to bobrippling/ps4bot that referenced this issue May 24, 2019
reactions aren't working, looks like:
slack-rs/slack-rs#111
bobrippling added a commit to bobrippling/ps4bot that referenced this issue May 24, 2019
reactions aren't working, looks like:
slack-rs/slack-rs#111
bobrippling added a commit to bobrippling/ps4bot that referenced this issue May 25, 2019
reactions aren't working, looks like:
slack-rs/slack-rs#111
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants