This repository was archived by the owner on May 27, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 638
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Per slackapi#360, this is the first step towards implementing a `robot.react` method based on: https://github.com/mbland/hubot-slack-reaction-example/blob/v1.1.0/scripts/handle-reaction.coffee The previous Hubot development dependency version was ~2.11, but the `robot.listen` method didn't appear until v2.16.0: hubotio/hubot#986 hubotio/hubot#1035
Per slackapi#360, this implements `robot.react` as a replacement for the approach from: https://github.com/mbland/hubot-slack-reaction-example/blob/v1.1.0/scripts/handle-reaction.coffee Specifically, the `ReactionMessage` definition will no longer be required in client code, and this: robot.listen( (message) -> message instanceof ReactionMessage handleReaction ) can now become: robot.react handleReaction `robot.react` can also take optional `matcher` and `options` arguments just like the underlying `robot.listen` method: robot.react( (message) -> message.type == 'added' && message.reaction == '+1' {id: 'my-reaction-matcher'} handleReaction )
|
Changes Unknown when pulling e7d95c4 on mbland:robot-react into * on slackhq:master*. |
mbland
added a commit
to mbland/hubot-slack-reaction-example
that referenced
this pull request
Oct 6, 2016
After slackapi/hubot-slack#363 goes in, this dependency should be updated.
mbland
added a commit
to mbland/hubot-slack-reaction-example
that referenced
this pull request
Oct 6, 2016
Contributor
Author
|
FYI, I updated the "Hello, World!" example to use |
mbland
added a commit
to mbland/hubot-slack-reaction-example
that referenced
this pull request
Oct 6, 2016
slackapi/hubot-slack#363 has been merged into master. When the next version is released, the dependency can be updated to reflect that version.
mbland
added a commit
to mbland/hubot-slack-github-issues
that referenced
this pull request
Oct 7, 2016
Thanks to the new @slack/client npm, slackapi/hubot-slack#360, and slackapi/hubot-slack#363, the `SlackBot` will now emit a `ReactionMessage` object for `reaction_added` and `reaction_removed` events. A future commit will repackage the logic so that it is no longer middleware, but called as part of a `robot.listen` or `robot.react` callback.
mbland
added a commit
to mbland/hubot-slack-github-issues
that referenced
this pull request
Oct 7, 2016
Added via slackapi/hubot-slack#363. When a new release beyond 4.10.0 is released with this change, a future commit will update the dependency accordingly.
mbland
added a commit
to mbland/hubot-slack-github-issues
that referenced
this pull request
Oct 7, 2016
Added via slackapi/hubot-slack#363. When a new release beyond 4.10.0 is released with this change, a future commit will update the dependency accordingly.
6 tasks
This was referenced Nov 5, 2017
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Summary
Add hubot.Robot.react
Per #360, this implements
robot.reactas a replacement for the approach from mbland/hubot-slack-reaction-example v1.1.0. Specifically, theReactionMessagedefinition will no longer be required in client code, and this:can now become:
Robot.reactcan also take optionalmatcherandoptionsarguments just like the underlyingRobot.listenmethod:NOTE: It was necessary to bump the
hubotdevelopment dependency to at least v2.16.0, since that is when theRobot.listenmethod first appeared. I took the liberty of bumping it to the current version by specifying^2.19.Related Issues
Follows from the post-merge discussion of #360.
Test strategy
Unit tests to validate the new
Robot.reactmethod as part of the existingAdapterand the newRobot.reactsuites.cc: @johnagan @DEGoodmanWilson