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

SlackBot#send() support for a callback function #473

Open
3 tasks done
aoberoi opened this issue Apr 13, 2018 · 0 comments
Open
3 tasks done

SlackBot#send() support for a callback function #473

aoberoi opened this issue Apr 13, 2018 · 0 comments
Labels
enhancement M-T: A feature request for new functionality good first issue

Comments

@aoberoi
Copy link
Contributor

aoberoi commented Apr 13, 2018

Description

in order to know anything about a message after it has been sent, there needs to be a way to run a callback after the chat.postMessage() method completes.

it seems that the Response#send() (from Hubot core) method will invoke the adapter's send() method with the final item in the messages... array set to a function, if the user's script specified one.

this means that all we need to do is pass that callback function into the SlackClient#send() method and make sure it's used as the callback (we can set a default value of a noop function if not).

this support should also be extended to reply() and setTopic().

this would unlock use cases such as #91

Requirements (place an x in each of the [ ])

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement M-T: A feature request for new functionality good first issue
Projects
None yet
Development

No branches or pull requests

1 participant