-
Notifications
You must be signed in to change notification settings - Fork 219
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
Adding support and check for the event subtypes #451
Adding support and check for the event subtypes #451
Conversation
Signed-off-by: Gaspard Petit <gaspard.petit@eidosmontreal.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I will take a look at this later. Check one comment I left first.
slack-api-model/src/main/java/com/slack/api/model/event/Event.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Gaspard Petit <gaspard.petit@eidosmontreal.com>
Codecov Report
@@ Coverage Diff @@
## master #451 +/- ##
============================================
- Coverage 83.99% 83.64% -0.36%
- Complexity 2385 2386 +1
============================================
Files 250 250
Lines 6406 6438 +32
Branches 579 586 +7
============================================
+ Hits 5381 5385 +4
- Misses 667 694 +27
- Partials 358 359 +1
Continue to review full report at Codecov.
|
Thanks for your contribution 🙇♂️ I've verified your change works and merged into the |
Thanks for adding a test and accepting my PR! I will do my best to include one next time I contribute. |
* [slack-api-model] Add missing fields in objects (confirm.style in blocks, user.is_invited_user: boolean, message.hidden, Slack post related fields in file objects) - thanks @seratch * [slack-api-client etc] #466 #462 Calls API support - thanks @seratch * [slack-api-client] #475 #474 Make redirect_uri for oauth.access / oauth.v2.access optional - thanks @natevaughan @seratch * [slack-api-client] #476 Bump dependencies (okhttp, micronaut, tyrus-standalone-client) - thanks @seratch * [slack-api-client] #459 Adding ping message and pong event to RTM client - thanks @gaspardpetit * [slack-api-client] #451 Add support and check for the event subtypes in RTM client - thanks @gaspardpetit * [bolt] #455 Improve OAuth flow module to consider the cases where team is missing in oauth.v2.access responses - thanks @seratch * [bolt] #476 Bump dependencies (aws-java-sdk-s3) - thanks @seratch
* [slack-api-model] Add missing fields in objects (confirm.style in blocks, user.is_invited_user: boolean, message.hidden, Slack post related fields in file objects) - thanks @seratch * [slack-api-client etc] slackapi#466 slackapi#462 Calls API support - thanks @seratch * [slack-api-client] slackapi#475 slackapi#474 Make redirect_uri for oauth.access / oauth.v2.access optional - thanks @natevaughan @seratch * [slack-api-client] slackapi#476 Bump dependencies (okhttp, micronaut, tyrus-standalone-client) - thanks @seratch * [slack-api-client] slackapi#459 Adding ping message and pong event to RTM client - thanks @gaspardpetit * [slack-api-client] slackapi#451 Add support and check for the event subtypes in RTM client - thanks @gaspardpetit * [bolt] slackapi#455 Improve OAuth flow module to consider the cases where team is missing in oauth.v2.access responses - thanks @seratch * [bolt] slackapi#476 Bump dependencies (aws-java-sdk-s3) - thanks @seratch
Signed-off-by: Gaspard Petit gaspard.petit@eidosmontreal.com
Summary
Right now the RTM client does not consider the subtype when deserializing messages and dispatching them. This results in class conversion exceptions when multiple handlers are registered for different events of the same types, ex. MessageEvent and MessageChangedEvents. Both receive the notification possibly with the wrong object type.
Requirements (place an
x
in each[ ]
)