You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is similar to issue #52, which was resolved but seems to still be a problem for me. Specifically, I am trying to parse an incoming event action like so:
For some events, like a message, it works wonderfully. But for others, where there is no ts field, I get this error from Jackson:
Cannot construct instance of `com.hubspot.slack.client.models.events.SlackEventSkeleton`, problem: Cannot build SlackEventSkeleton, some of required attributes are not set [ts]
I would love to use all the event models that are built up in this project, as I'm already using the web API and it's working great, but this is a bit of a showstopper for me. Any ideas how to work around it?
Thank you for the great project!
The text was updated successfully, but these errors were encountered:
If not, I think the answer here is that we need to adjust the class hierarchy to ensure that things that don't have a referenced message (like e.g. an app event) don't inherit the exact same fields via the same class hierarchy as message events.
Just a quick update on this: I fixed this specifically for the app_home_opened event... by creating a SlackAppHomeOpenedEvent event (issue #129). But more generally, my code simply can never parse the event wrappers intoSlackEventWrapper if there isn't a specific event class mapped in SlackEventType enum.
I agree that there is something wrong with the class hierarchy. There have been a number of issues along the way related to ts, which seems to be the offended issue. But the fix to this is a bit out of my reach out at the moment. Either way, I need new event classes for app_uninstalled, tokens_revoked, and dnd_updated so I'm going to keep working around this the same way I did for app_home_opened. The only weird thing is that app_uninstalled has no body, so my patch for that one probably should get some extra scrutiny :)
This is similar to issue #52, which was resolved but seems to still be a problem for me. Specifically, I am trying to parse an incoming event action like so:
For some events, like a message, it works wonderfully. But for others, where there is no
ts
field, I get this error from Jackson:I would love to use all the event models that are built up in this project, as I'm already using the web API and it's working great, but this is a bit of a showstopper for me. Any ideas how to work around it?
Thank you for the great project!
The text was updated successfully, but these errors were encountered: