Skip to content

Commit

Permalink
Fix #51 (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheDeadCode authored and mpociot committed Dec 4, 2017
1 parent 6e85a8d commit 3c924a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/FacebookDriver.php
Expand Up @@ -312,7 +312,7 @@ public function buildServicePayload($message, $matchingMessage, $additionalParam
{
if ($this->driverEvent) {
$payload = $this->driverEvent->getPayload();
if (isset($payload['optin'])) {
if (isset($payload['optin']) && isset($payload['optin']['user_ref'])) {
$recipient = ['user_ref' => $payload['optin']['user_ref']];
} else {
$recipient = ['id' => $payload['sender']['id']];
Expand Down

0 comments on commit 3c924a2

Please sign in to comment.