Skip to content

Commit

Permalink
TelegramTypes: added deprecated but still used Message::$new_chat_par…
Browse files Browse the repository at this point in the history
…ticipant and Message::$left_chat_participant
  • Loading branch information
DJTommek committed May 13, 2023
1 parent e93fd5e commit b7e31a3
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/Telegram/Types/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,17 +258,33 @@ class Message extends TelegramTypes
/**
* Optional. A new member was added to the group, information about them (this member may be the bot itself)
*
* @deprecated
* @deprecated Backward compatibility, use $new_chat_members array instead
* @var User
*/
public $new_chat_member;

/**
* Optional. A new member was added to the group, information about them (this member may be the bot itself)
*
* @deprecated Backward compatibility, use $new_chat_members array instead
* @var User
*/
public $new_chat_participant;

/**
* Optional. A member was removed from the group, information about them (this member may be the bot itself)
* @var User
*/
public $left_chat_member;

/**
* Optional. A member was removed from the group, information about them (this member may be the bot itself)
*
* @deprecated Backward compatibility, use $left_chat_member instead
* @var User
*/
public $left_chat_participant;

/**
* Optional. A chat title was changed to this value
* @var string
Expand Down Expand Up @@ -401,7 +417,9 @@ protected function mapSubObjects(string $key, array $data): TelegramTypes
case 'from':
case 'forward_from':
case 'new_chat_member':
case 'new_chat_participant':
case 'left_chat_member':
case 'left_chat_participant':
case 'via_bot':
return new User($data, $this->logger);
case 'new_chat_members':
Expand Down

0 comments on commit b7e31a3

Please sign in to comment.