Skip to content

Commit

Permalink
Merge pull request #277 from siamakdals/master
Browse files Browse the repository at this point in the history
Update Telegram.php
  • Loading branch information
Eleirbag89 authored Jun 9, 2022
2 parents ed98561 + f3ce033 commit bc0dd1d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Telegram.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ class Telegram
* Constant for type Channel Post.
*/
const CHANNEL_POST = 'channel_post';
/**
* Constant for type New Chat Member.
*/
const NEW_CHAT_MEMBER = 'new_chat_member';
/**
* Constant for type Left Chat Member.
*/
const LEFT_CHAT_MEMBER = 'left_chat_member';

private $bot_token = '';
private $data = [];
Expand Down Expand Up @@ -1727,6 +1735,12 @@ public function getUpdateType()
if (isset($update['message']['document'])) {
return self::DOCUMENT;
}
if (isset($update['message']['new_chat_member'])) {
return self::NEW_CHAT_MEMBER;
}
if (isset($update['message']['left_chat_member'])) {
return self::LEFT_CHAT_MEMBER;
}
if (isset($update['channel_post'])) {
return self::CHANNEL_POST;
}
Expand Down

0 comments on commit bc0dd1d

Please sign in to comment.