Skip to content

Commit db32de0

Browse files
committed
bug #208 Slackbot handler does not work
1 parent ebce76a commit db32de0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

DependencyInjection/Configuration.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@
219219
* - [bubble]: bool, defaults to true
220220
*
221221
* - slackbot:
222-
* - team: slack team slug
222+
* - slack_team: slack team slug
223223
* - token: slackbot token
224224
* - channel: channel name (with starting #)
225225
* - [level]: level name or int value, defaults to DEBUG
@@ -721,8 +721,8 @@ public function getConfigTreeBuilder()
721721
->thenInvalid('The webhook_url have to be specified to use a SlackWebhookHandler')
722722
->end()
723723
->validate()
724-
->ifTrue(function ($v) { return 'slackbot' === $v['type'] && (empty($v['stack_team']) || empty($v['token']) || empty($v['channel'])); })
725-
->thenInvalid('The stack_team, token and channel have to be specified to use a SlackbotHandler')
724+
->ifTrue(function ($v) { return 'slackbot' === $v['type'] && (empty($v['slack_team']) || empty($v['token']) || empty($v['channel'])); })
725+
->thenInvalid('The slack_team, token and channel have to be specified to use a SlackbotHandler')
726726
->end()
727727
->validate()
728728
->ifTrue(function ($v) { return 'cube' === $v['type'] && empty($v['url']); })

DependencyInjection/MonologExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ private function buildHandler(ContainerBuilder $container, $name, array $handler
552552
$definition->setArguments(array(
553553
$handler['slack_team'],
554554
$handler['token'],
555-
$handler['channel'],
555+
urlencode($handler['channel']),
556556
$handler['level'],
557557
$handler['bubble'],
558558
));

0 commit comments

Comments
 (0)