Skip to content

Commit

Permalink
Include changes of API v3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
unreal4u committed Aug 24, 2017
1 parent bb29215 commit cdfcfc3
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Telegram/Types/Chat.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,19 @@ class Chat extends TelegramTypes
*/
public $invite_link = '';

/**
* Optional. Pinned message, for supergroups. Returned only in getChat
* @var Message
*/
public $pinned_message;

public function mapSubObjects(string $key, array $data): TelegramTypes
{
switch ($key) {
case 'photo':
return new ChatPhoto($data, $this->logger);
case 'pinned_message':
return new Message($data, $this->logger);
}
return parent::mapSubObjects($key, $data);
}
Expand Down
12 changes: 12 additions & 0 deletions src/Telegram/Types/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ class Message extends TelegramTypes
*/
public $forward_from_message_id = 0;

/**
* Optional. For messages forwarded from channels, signature of the post author if present
* @var string
*/
public $forward_signature = '';

/**
* Optional. For forwarded messages, date the original message was sent in Unix time
* @var int
Expand All @@ -79,6 +85,12 @@ class Message extends TelegramTypes
*/
public $edit_date = 0;

/**
* Optional. Signature of the post author for messages in channels
* @var string
*/
public $author_signature = '';

/**
* Optional. For text messages, the actual UTF-8 text of the message, 0-4096 characters
* @var string
Expand Down
6 changes: 6 additions & 0 deletions src/Telegram/Types/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ class User extends TelegramTypes
*/
public $id = 0;

/**
* True, if this user is a bot
* @var bool
*/
public $is_bot = false;

/**
* User‘s or bot’s first name
* @var string
Expand Down

0 comments on commit cdfcfc3

Please sign in to comment.