From eaaa7ad5b3e67bcda63b6b70846310fe3ddb5dfa Mon Sep 17 00:00:00 2001 From: Gustavo Sobrinho Date: Sun, 29 Dec 2019 22:18:49 -0300 Subject: [PATCH] Adding the required parameter to fix Message dispatch --- src/Plivo/Resources/Message/MessageInterface.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Plivo/Resources/Message/MessageInterface.php b/src/Plivo/Resources/Message/MessageInterface.php index 6660b2f6..fc695274 100644 --- a/src/Plivo/Resources/Message/MessageInterface.php +++ b/src/Plivo/Resources/Message/MessageInterface.php @@ -55,8 +55,8 @@ public function get($messageUuid) $this->pathParams['authId'], $this->uri); } - - + + /** * Return a list of messages @@ -147,7 +147,7 @@ protected function getList($optionalArgs = []) * @throws PlivoValidationException,PlivoResponseException */ - public function create($src, array $dst, $text=null, + public function create($src, array $dst, $text, array $optionalArgs = [], $powerpackUUID = null) { $mandatoryArgs = [ @@ -173,11 +173,11 @@ public function create($src, array $dst, $text=null, $response = $this->client->update( $this->uri, - array_merge($mandatoryArgs, $optionalArgs, ['src' => $src, 'powerpack_uuid' => $powerpackUUID]) + array_merge($mandatoryArgs, $optionalArgs, ['src' => $src, 'powerpack_uuid' => $powerpackUUID, 'text' => $text]) ); $responseContents = $response->getContent(); - + if(!array_key_exists("error",$responseContents)){ if(array_key_exists("invalid_number", $responseContents)){ return new MessageCreateResponse( @@ -209,4 +209,4 @@ public function create($src, array $dst, $text=null, } } -} \ No newline at end of file +}