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
Hey! I'm looking at supporting the other activity types that could arise, but it looks like changes to the core library are required to make that possible.
Would you be interested in a PR for either of these solutions?
A fallback handler so that if any other activity isn't handled, the fallback handler is invoked and is given the opportunity to handle unsupported activities. This should be backwards compatible, but isn't as clean.
Or, turn handlers into a map[schema.ActivityType]func(turn *activity.TurnContext) (schema.Activity, error) and allow for handlers for any ActivityType to be defined that way. This way seems potentially cleaner to me, but also looks like a breaking change.
Or, continue out the pattern as it is in the repository with the rest of the ActivityTypes. This would be backwards compatible, but would have a bit of duplication.
The text was updated successfully, but these errors were encountered:
Hey @PrasadG193 -- do you have opinions on which of these approaches would work? The first is probably the cleanest, but would then be a breaking change when activities move from "unsupported" to "supported."
Ultimately, I'd like to do the second option because it allows us to support all the different types that may arise and also allows a fallback handler to be defined that doesn't suffer from the above breaking change since the developer always has the option to implement any schema.ActivityType instead of letting the fallback handle it.
To do this, we'd have to change the signature of (*BotFrameworkAdapter).ProcessActivity since we'd have to pass a different type of handler. Spiking out some code, I think usage would look like this:
Hey! I'm looking at supporting the other activity types that could arise, but it looks like changes to the core library are required to make that possible.
Would you be interested in a PR for either of these solutions?
map[schema.ActivityType]func(turn *activity.TurnContext) (schema.Activity, error)
and allow for handlers for any ActivityType to be defined that way. This way seems potentially cleaner to me, but also looks like a breaking change.The text was updated successfully, but these errors were encountered: