diff --git a/src/Conversation.php b/src/Conversation.php index b527aa5..c62480d 100644 --- a/src/Conversation.php +++ b/src/Conversation.php @@ -220,10 +220,12 @@ 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"); @@ -231,7 +233,8 @@ public function addMessage($message, $type = "message") $new_message = [ "content" => $message, - "type" => $type + "type" => $type, + "metas" => $metas ]; $this->messages[] = $new_message;