Skip to content

Commit

Permalink
Merge pull request #24 from Leosten/feature/34504
Browse files Browse the repository at this point in the history
[FEATURE#34504] Ajout des metas dans les messages sur proxy
  • Loading branch information
TinyTinyKame authored Feb 23, 2017
2 parents c83b2d6 + 11f3903 commit 3208197
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Conversation.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,18 +220,21 @@ public function getAcls()
* Add message to conversation
*
* @param string $message
* @param string $type
* @param array $metas
*
* @return self
*/
public function addMessage($message, $type = "message")
public function addMessage($message, $type = "message", array $metas = null)
{
if (false === is_string($message)) {
throw new \Exception("Message given to addMessage method needs to be of type string");
}

$new_message = [
"content" => $message,
"type" => $type
"type" => $type,
"metas" => $metas
];

$this->messages[] = $new_message;
Expand Down

0 comments on commit 3208197

Please sign in to comment.