-
Notifications
You must be signed in to change notification settings - Fork 636
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
Rich "Attachment" Notifications Implemented #32
Conversation
@@ -110,6 +127,9 @@ class Slack extends Adapter | |||
# The star. | |||
################################################################### | |||
run: -> | |||
@robot.on 'slack-attachment', (payload)=> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From a readability point of view, I think it makes sense to wait until the options are parsed and possible errors are logged to bind this listener.
Looks good to me. Since it's pretty slack-specific, would be good to get @grantmd's opinion. |
Thanks @evansolomon for your comments |
Rich "Attachment" Notifications Implemented
Thank you @balbeko for the code and @evansolomon for the reviews! |
I'd be curious to see is how you'd be able to write scripts that work for other adapters, while still being able to add slack-specific enhancements. I'm also not sure if I'm 👍 on naming it |
@technicalpickles what's a best way to determine in script, what adapter is used? |
@balbeko some discussion about that in hubotio/hubot#647 , still need to put together a PR to make the name accessible though. |
I've finally implemented Attachment notifications, as suggested in #24
After a short discussion on IRC with @technicalpickles we've found probably a best way to implement this without extending core hubot functionality.
I've also wrote an example script that represents, how to use this feature. The code below will result with such message in a chat room: