From 834422eaa29122dac31a20c5a3abb85e643df65a Mon Sep 17 00:00:00 2001 From: Leonard LEUNG CHONG WO Date: Thu, 2 Feb 2017 14:53:41 +0100 Subject: [PATCH 1/4] [FEATURE#34504] Ajout des metas dans les messages --- src/Conversation.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Conversation.php b/src/Conversation.php index b527aa5..8f7758c 100644 --- a/src/Conversation.php +++ b/src/Conversation.php @@ -223,7 +223,7 @@ public function getAcls() * * @return self */ - public function addMessage($message, $type = "message") + public function addMessage($message, $type = "message", $metas = null) { if (false === is_string($message)) { throw new \Exception("Message given to addMessage method needs to be of type string"); @@ -231,7 +231,8 @@ public function addMessage($message, $type = "message") $new_message = [ "content" => $message, - "type" => $type + "type" => $type, + "metas" => $metas ]; $this->messages[] = $new_message; From 2f140c22515e90c03d2dfed74f9123de0ce05571 Mon Sep 17 00:00:00 2001 From: Leonard LEUNG CHONG WO Date: Tue, 7 Feb 2017 15:33:53 +0100 Subject: [PATCH 2/4] [FEATURE#34504] parametre manquant --- src/Conversation.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Conversation.php b/src/Conversation.php index 8f7758c..2e27ac7 100644 --- a/src/Conversation.php +++ b/src/Conversation.php @@ -220,6 +220,7 @@ public function getAcls() * Add message to conversation * * @param string $message + * @param array $metas * * @return self */ From ab587819cf5f465f9280c6553891aa7a10951492 Mon Sep 17 00:00:00 2001 From: Leonard LEUNG CHONG WO Date: Wed, 8 Feb 2017 08:50:41 +0100 Subject: [PATCH 3/4] [FEATURE#34504] param manquant --- src/Conversation.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Conversation.php b/src/Conversation.php index 2e27ac7..299392d 100644 --- a/src/Conversation.php +++ b/src/Conversation.php @@ -220,6 +220,7 @@ public function getAcls() * Add message to conversation * * @param string $message + * @param string $type * @param array $metas * * @return self From 11f390307dce47668f5b90f1eaaa3d92046341e4 Mon Sep 17 00:00:00 2001 From: Leonard LEUNG CHONG WO Date: Tue, 21 Feb 2017 14:29:48 +0100 Subject: [PATCH 4/4] [FEATURE#34504] typehint correction --- src/Conversation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Conversation.php b/src/Conversation.php index 299392d..c62480d 100644 --- a/src/Conversation.php +++ b/src/Conversation.php @@ -225,7 +225,7 @@ public function getAcls() * * @return self */ - public function addMessage($message, $type = "message", $metas = null) + 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");