Fix ReplyToMessage class, as data wasn't set properly.

parent d2205167
...@@ -10,22 +10,27 @@ ...@@ -10,22 +10,27 @@
namespace Longman\TelegramBot\Entities; namespace Longman\TelegramBot\Entities;
/**
* Class ReplyToMessage
*
* @todo Is this even required?!
*/
class ReplyToMessage extends Message class ReplyToMessage extends Message
{ {
/** /**
* ReplyToMessage constructor. * ReplyToMessage constructor.
* *
* @param array $data * @param array $data
* @param string $bot_name * @param string $bot_name
*
* @throws \Longman\TelegramBot\Exception\TelegramException
*/ */
public function __construct(array $data, $bot_name = '') public function __construct(array $data, $bot_name = '')
{ {
//As explained in the documentation //As explained in the documentation
//Reply to message can't contain other reply to message entities //Reply to message can't contain other reply to message entities
$reply_to_message = null; unset($data['reply_to_message']);
$this->init($data, $bot_name); parent::__construct($data, $bot_name);
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment