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

[Sample] The reaction buttons sample should be updated to use the SDK's reaction handlers #2229

Closed
tdurnford opened this issue Jul 26, 2019 · 0 comments · Fixed by #2239
Closed
Assignees

Comments

@tdurnford
Copy link
Contributor

tdurnford commented Jul 26, 2019

Description

The Bot Framework development team added onMessageReaction, onReactionsAdded , and onReactionsRemoved handlers to the SDK's Activity Handler in v4.5. The handlers check if the incoming activity's type is ActivityTypes.MessageReaction and then checks the activity's reactionsAdded and reactionsRemoved attributes to determine which handler to invoke.

Currently, the Customize Web Chat with Reaction Buttons Sample posts a ActivityTypes.Message activity to the bot and adds the reaction to the activity's value property.

handleDownvoteButton = () => this.props.postActivity({ type: 'message', name: 'evaluate-activity', value: { activityID: this.props.activityID, helpful: -1 } })
handleUpvoteButton = () => this.props.postActivity({ type: 'message', name: 'evaluate-activity', value: { activityID: this.props.activityID, helpful: 1 } })

The sample should be updated to use the new activity type - ActivityTypes.MessageReaction - and add the reaction changes to the activity's reactionsAdded or reactionsRemoved attributes. Mock Bot will probably have to be updated as well to handle these changes.

[Bug]

@tdurnford tdurnford added bug Indicates an unexpected problem or an unintended behavior. Pending labels Jul 26, 2019
@tdurnford tdurnford self-assigned this Jul 26, 2019
@tdurnford tdurnford added Enhancement and removed bug Indicates an unexpected problem or an unintended behavior. labels Jul 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants