From b162fbd78d5785f6add80cb6d084f49090eb256b Mon Sep 17 00:00:00 2001 From: derrickobedgiu1 Date: Mon, 11 Mar 2024 14:27:25 +0300 Subject: [PATCH] Added react to message feature --- src/Message/ReactionMessage.php | 36 +++++++++++++++++++ .../MessageRequest/RequestReactionMessage.php | 27 ++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 src/Message/ReactionMessage.php create mode 100644 src/Request/MessageRequest/RequestReactionMessage.php diff --git a/src/Message/ReactionMessage.php b/src/Message/ReactionMessage.php new file mode 100644 index 0000000..2b29ad9 --- /dev/null +++ b/src/Message/ReactionMessage.php @@ -0,0 +1,36 @@ +emoji = $emoji; + $this->message_id = $message_id; + + parent::__construct($to, null); + } + + public function emoji(): string + { + return $this->emoji; + } + + public function message_id(): string + { + return $this->message_id; + } +} diff --git a/src/Request/MessageRequest/RequestReactionMessage.php b/src/Request/MessageRequest/RequestReactionMessage.php new file mode 100644 index 0000000..9bea82c --- /dev/null +++ b/src/Request/MessageRequest/RequestReactionMessage.php @@ -0,0 +1,27 @@ + $this->message->messagingProduct(), + 'recipient_type' => $this->message->recipientType(), + 'to' => $this->message->to(), + 'type' => $this->message->type(), + $this->message->type() => [ + 'message_id' => $this->message->message_id(), + 'emoji' => $this->message->emoji(), + ], + ]; + + return $body; + } +}