File tree Expand file tree Collapse file tree 1 file changed +2
-18
lines changed Expand file tree Collapse file tree 1 file changed +2
-18
lines changed Original file line number Diff line number Diff line change @@ -843,24 +843,8 @@ public function Caption()
843
843
*/
844
844
public function ChatID ()
845
845
{
846
- $ type = $ this ->getUpdateType ();
847
- if ($ type == self ::CALLBACK_QUERY ) {
848
- return @$ this ->data ['callback_query ' ]['message ' ]['chat ' ]['id ' ];
849
- }
850
- if ($ type == self ::CHANNEL_POST ) {
851
- return @$ this ->data ['channel_post ' ]['chat ' ]['id ' ];
852
- }
853
- if ($ type == self ::EDITED_MESSAGE ) {
854
- return @$ this ->data ['edited_message ' ]['chat ' ]['id ' ];
855
- }
856
- if ($ type == self ::INLINE_QUERY ) {
857
- return @$ this ->data ['inline_query ' ]['from ' ]['id ' ];
858
- }
859
- if ($ type == self ::MY_CHAT_MEMBER ) {
860
- return @$ this ->data ['my_chat_member ' ]['chat ' ]['id ' ];
861
- }
862
-
863
- return $ this ->data ['message ' ]['chat ' ]['id ' ];
846
+ $ chat = $ this ->Chat ();
847
+ return $ chat ['id ' ];
864
848
}
865
849
/**
866
850
* \return the Array chat.
You can’t perform that action at this time.
0 commit comments