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

Added support for React messages #7

Closed
wants to merge 1 commit into from
Closed

Added support for React messages #7

wants to merge 1 commit into from

Conversation

AndrewArace
Copy link

Added support for the slack reactions.add api call.

Added support for the slack reactions.add api call.
@AndrewArace
Copy link
Author

Sure. In slack, you can add a reaction to any message, via the "add reaction" context menu for a given message, or using the keyboard with a ctrl+shift+
This adds the functionality to the Bot class, so a responder can add a reaction to a trigger message, and then it would probably return a null response. An example: a responder could be created that performed some action, but instead of sending a response message "okay did it", the responder could just add a 👍 reaction emoticon to the trigger message.

@madslyng
Copy link

madslyng commented Nov 6, 2015

Okay, that seems good. One comment though. Doesn't it appear to you that a lot of the code is duplicated ? Say() and React() look almost the same.. just wondering if we can improve on that ?

@AndrewArace
Copy link
Author

Yes, we probably could - but it had different requirements up to the actual
http post.
I'll take a look at it tomorrow, I won't be around a computer tonight.

On Fri, Nov 6, 2015, 6:48 PM Steffen Sun Lyng notifications@github.com
wrote:

Okay, that seems good. One comment though. Doesn't it appear to you that a
lot of the code is duplicated ? Say() and React() look almost the same..
just wondering if we can improve on that ?


Reply to this email directly or view it on GitHub
#7 (comment).

@AndrewArace
Copy link
Author

I took a look at the Say() and React() - while similar, there's not much we could do in terms of simplifying them/reducing them. What looks like duplication isn't, since:

  • React needs to verify the context has a timestamp
  • React needs different items in the values list, namely "timestamp" and "name"

So, aside from the GetChatHubId, which I already broke out into a reusable static method, I think we're as simplified as we can be.
Do you have any other suggestions?

@jammerware
Copy link
Owner

@AndrewArace Thanks for your work on this. As you saw, there's another developer trying to do something similar over here, so let's work on that angle together. Sorry for being a little slapdash about keeping up with these pull requests. I'm pretty new to collaboration on github. Thanks again for working on this!

@jammerware jammerware closed this Nov 16, 2015
@AndrewArace
Copy link
Author

Understood, that's a better approach, anyway.
👍 :)

On Mon, Nov 16, 2015 at 12:59 PM, Jammerware notifications@github.com
wrote:

Closed #7 #7.


Reply to this email directly or view it on GitHub
#7 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants