File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -862,6 +862,30 @@ public function ChatID()
862
862
863
863
return $ this ->data ['message ' ]['chat ' ]['id ' ];
864
864
}
865
+ /**
866
+ * \return the Array chat.
867
+ */
868
+ public function Chat ()
869
+ {
870
+ $ type = $ this ->getUpdateType ();
871
+ if ($ type == self ::CALLBACK_QUERY ) {
872
+ return @$ this ->data ['callback_query ' ]['message ' ]['chat ' ];
873
+ }
874
+ if ($ type == self ::CHANNEL_POST ) {
875
+ return @$ this ->data ['channel_post ' ]['chat ' ];
876
+ }
877
+ if ($ type == self ::EDITED_MESSAGE ) {
878
+ return @$ this ->data ['edited_message ' ]['chat ' ];
879
+ }
880
+ if ($ type == self ::INLINE_QUERY ) {
881
+ return @$ this ->data ['inline_query ' ]['from ' ];
882
+ }
883
+ if ($ type == self ::MY_CHAT_MEMBER ) {
884
+ return @$ this ->data ['my_chat_member ' ]['chat ' ];
885
+ }
886
+
887
+ return $ this ->data ['message ' ]['chat ' ];
888
+ }
865
889
866
890
/// Get the message_id of the current message
867
891
You can’t perform that action at this time.
0 commit comments