Closed REBELinBLUE closed 9 years ago
Hi @REBELinBLUE,
It's possibly a good idea, although I figured people would set defaults in the config (if using Laravel) or when instantiating the class, so then it's pretty explicit as to how the post will work (without magic defaults on the Slack side getting confusing).
I figure you're using the package outside of Laravel, where it could be more elegant to not have to include the username and channel explicitly when creating the client, and let Slack handle it. If you'd find that useful, I'll look at including it :-).
No problem.
I was just confused when I first started using it as I couldn't figure out where my notifications were going as I had not set a channel
I think it's a good idea, at least then the hardcoded class defaults don't cause confusion. Will look at it over the holidays. Thanks.
Implemented in version 1.0
When you set up a webhook on slack it asks you the username and channel to use. You only need to include those variables in the post request if you want to overwrite what you have set.
Shouldn't Client.php have them undefined by default rather than explicitly set, and then only send them if they have been set with setChannel or setUsername?