diff --git a/src/BotFrameworkDriver.php b/src/BotFrameworkDriver.php index d06a759..5145c27 100644 --- a/src/BotFrameworkDriver.php +++ b/src/BotFrameworkDriver.php @@ -187,7 +187,7 @@ public function buildServicePayload($message, $matchingMessage, $additionalParam /** * Originated messages use the getSender method, otherwise getRecipient. */ - $recipient = $matchingMessage->getSender() === '' ? $matchingMessage->getRecipient() : $matchingMessage->getSender(); + $recipient = $matchingMessage->getRecipient() === '' ? $matchingMessage->getSender() : $matchingMessage->getRecipient(); $payload = is_null($matchingMessage->getPayload()) ? [] : $matchingMessage->getPayload()->all(); $this->apiURL = Collection::make($payload)->get('serviceUrl', Collection::make($additionalParameters)->get('serviceUrl')).'/v3/conversations/'.urlencode($recipient).'/activities';