-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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 Emoji support for the Slack Handler #413
Conversation
You should at the new argument to the end to be backward compatible. And wouldn't be using |
True @xabbuh ... Will do that now |
@xabbuh, take a look and let me know if there's anything else I need to attend to. |
I wouldn't modify the existing test, but keep it instead to ensure that the old behaviour doesn't break. You can add a new for the icon. |
Thanks for the assitance @xabbuh. Hope this is good to go. |
@@ -54,7 +54,17 @@ public function testWriteContent() | |||
fseek($this->res, 0); | |||
$content = fread($this->res, 1024); | |||
|
|||
$this->assertRegexp('/token=myToken&channel=channel1&username=Monolog&text=&attachments=.*$/', $content); | |||
$this->assertRegexp('/token=myToken&channel=channel1&username=Monolog&text=&attachments=.*/', $content); |
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.
Is this modification really needed? I would have expected the url not to change at all.
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.
well, if it is anchored at the end, it will not match anymore when &icon_emoji=%3Aalien%3A
is added at the end
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.
But this is the test without the icon, isn't it?
To me it looks good now. |
Thanks everyone, looks good! |
Added Emoji support for the Slack Handler
Just FYI I moved the emoji arg back before $level since SlackHandler was actually never released in a stable version of Monolog. Anyone depending on it should watch out. |
Added emoji support as per slack api doc: https://api.slack.com/methods/chat.postMessage. Updated tests.