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

parent d2205167
......@@ -10,22 +10,27 @@
namespace Longman\TelegramBot\Entities;
/**
* Class ReplyToMessage
*
* @todo Is this even required?!
*/
class ReplyToMessage extends Message
{
/**
* ReplyToMessage constructor.
*
* @param array $data
* @param string $bot_name
*
* @throws \Longman\TelegramBot\Exception\TelegramException
*/
public function __construct(array $data, $bot_name = '')
{
//As explained in the documentation
//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