File tree 1 file changed +14
-0
lines changed
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,14 @@ class Telegram
71
71
* Constant for type Channel Post.
72
72
*/
73
73
const CHANNEL_POST = 'channel_post ' ;
74
+ /**
75
+ * Constant for type New Chat Member.
76
+ */
77
+ const NEW_CHAT_MEMBER = 'new_chat_member ' ;
78
+ /**
79
+ * Constant for type Left Chat Member.
80
+ */
81
+ const LEFT_CHAT_MEMBER = 'left_chat_member ' ;
74
82
75
83
private $ bot_token = '' ;
76
84
private $ data = [];
@@ -1727,6 +1735,12 @@ public function getUpdateType()
1727
1735
if (isset ($ update ['message ' ]['document ' ])) {
1728
1736
return self ::DOCUMENT ;
1729
1737
}
1738
+ if (isset ($ update ['message ' ]['new_chat_member ' ])) {
1739
+ return self ::NEW_CHAT_MEMBER ;
1740
+ }
1741
+ if (isset ($ update ['message ' ]['left_chat_member ' ])) {
1742
+ return self ::LEFT_CHAT_MEMBER ;
1743
+ }
1730
1744
if (isset ($ update ['channel_post ' ])) {
1731
1745
return self ::CHANNEL_POST ;
1732
1746
}
You can’t perform that action at this time.
0 commit comments