* Fixed type in \TgBotLib\Objects\Telegram > Message > fromArray() where forum_topic_created is being parsed for forum_topic_edited instead of forum_topic_edited

Updated README.md to reflect the new changes with TamerLib 2.+
This commit is contained in:
Netkas 2023-08-10 14:25:05 -04:00
parent fbc472d8de
commit 54e81b4137
No known key found for this signature in database
GPG key ID: 5DAF58535614062B
7 changed files with 51 additions and 40 deletions

View file

@ -91,6 +91,11 @@
$this->last_update_id = 0;
$this->command_handlers = [];
$this->event_handlers = [];
if(!preg_match('/^[0-9]{8,10}:[a-zA-Z0-9_-]{35}$/', $this->token))
{
throw new InvalidArgumentException(sprintf('Invalid token "%s"', $this->token));
}
}
/**

View file

@ -1298,7 +1298,7 @@
$object->passport_data = isset($data['passport_data']) ? PassportData::fromArray($data['passport_data']) : null;
$object->proximity_alert_triggered = isset($data['proximity_alert_triggered']) ? ProximityAlertTriggered::fromArray($data['proximity_alert_triggered']) : null;
$object->forum_topic_created = isset($data['forum_topic_created']) ? ForumTopicCreated::fromArray($data['forum_topic_created']) : null;
$object->forum_topic_edited = isset($data['forum_topic_created']) ? ForumTopicEdited::fromArray($data['forum_topic_edited']) : null;
$object->forum_topic_edited = isset($data['forum_topic_edited']) ? ForumTopicEdited::fromArray($data['forum_topic_edited']) : null;
$object->forum_topic_closed = isset($data['forum_topic_closed']) ? ForumTopicClosed::fromArray($data['forum_topic_closed']) : null;
$object->forum_topic_reopened = isset($data['forum_topic_reopened']) ? ForumTopicReopened::fromArray($data['forum_topic_reopened']) : null;
$object->general_forum_topic_hidden = isset($data['general_forum_topic_hidden']) ? GeneralForumTopicHidden::fromArray($data['general_forum_topic_hidden']) : null;