Skip to content

Commit

Permalink
Replace keys instead of combining when merging multi-dimensional arra…
Browse files Browse the repository at this point in the history
…ys (#21)
  • Loading branch information
crocodele authored and mpociot committed Nov 19, 2017
1 parent d9e938b commit 1baa616
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/SlackDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ protected function respondJSON($message, $matchingMessage, $parameters = [])
*/
protected function replyWithToken($message, $matchingMessage, $additionalParameters = [])
{
$parameters = array_merge_recursive([
$parameters = array_replace_recursive([
'as_user' => true,
'token' => $this->payload->get('token'),
'channel' => $matchingMessage->getRecipient() === '' ? $matchingMessage->getSender() : $matchingMessage->getRecipient(),
Expand Down
2 changes: 1 addition & 1 deletion src/SlackRTMDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ protected function isBot()
*/
public function buildServicePayload($message, $matchingMessage, $additionalParameters = [])
{
$parameters = array_merge_recursive([
$parameters = array_replace_recursive([
'channel' => $matchingMessage->getRecipient() ?: $matchingMessage->getSender(),
'as_user' => true,
], $additionalParameters);
Expand Down

0 comments on commit 1baa616

Please sign in to comment.