@@ -47,6 +47,10 @@ class Telegram
47
47
* Constant for type Voice.
48
48
*/
49
49
const VOICE = 'voice ' ;
50
+ /**
51
+ * Constant for type animation.
52
+ */
53
+ const ANIMATION = 'animation ' ;
50
54
/**
51
55
* Constant for type Document.
52
56
*/
@@ -3014,9 +3018,6 @@ public function getUpdateType()
3014
3018
if (isset ($ update ['edited_message ' ])) {
3015
3019
return self ::EDITED_MESSAGE ;
3016
3020
}
3017
- if (isset ($ update ['message ' ]['reply_to_message ' ])) {
3018
- return self ::REPLY ;
3019
- }
3020
3021
if (isset ($ update ['message ' ]['text ' ])) {
3021
3022
return self ::MESSAGE ;
3022
3023
}
@@ -3035,12 +3036,18 @@ public function getUpdateType()
3035
3036
if (isset ($ update ['message ' ]['contact ' ])) {
3036
3037
return self ::CONTACT ;
3037
3038
}
3038
- if (isset ($ update ['message ' ]['document ' ])) {
3039
- return self ::DOCUMENT ;
3040
- }
3041
3039
if (isset ($ update ['message ' ]['location ' ])) {
3042
3040
return self ::LOCATION ;
3043
3041
}
3042
+ if (isset ($ update ['message ' ]['reply_to_message ' ])) {
3043
+ return self ::REPLY ;
3044
+ }
3045
+ if (isset ($ update ['message ' ]['animation ' ])) {
3046
+ return self ::ANIMATION ;
3047
+ }
3048
+ if (isset ($ update ['message ' ]['document ' ])) {
3049
+ return self ::DOCUMENT ;
3050
+ }
3044
3051
if (isset ($ update ['channel_post ' ])) {
3045
3052
return self ::CHANNEL_POST ;
3046
3053
}
@@ -3062,9 +3069,9 @@ private function sendAPIRequest($url, array $content, $post = true)
3062
3069
curl_setopt ($ ch , CURLOPT_POST , 1 );
3063
3070
curl_setopt ($ ch , CURLOPT_POSTFIELDS , $ content );
3064
3071
}
3065
- echo "inside curl if " ;
3072
+ // echo "inside curl if";
3066
3073
if (!empty ($ this ->proxy )) {
3067
- echo "inside proxy if " ;
3074
+ // echo "inside proxy if";
3068
3075
if (array_key_exists ("type " , $ this ->proxy )) {
3069
3076
curl_setopt ($ ch , CURLOPT_PROXYTYPE , $ this ->proxy ["type " ]);
3070
3077
}
@@ -3074,12 +3081,12 @@ private function sendAPIRequest($url, array $content, $post = true)
3074
3081
}
3075
3082
3076
3083
if (array_key_exists ("url " , $ this ->proxy )) {
3077
- echo "Proxy Url " ;
3084
+ // echo "Proxy Url";
3078
3085
curl_setopt ($ ch , CURLOPT_PROXY , $ this ->proxy ["url " ]);
3079
3086
}
3080
3087
3081
3088
if (array_key_exists ("port " , $ this ->proxy )) {
3082
- echo "Proxy port " ;
3089
+ // echo "Proxy port";
3083
3090
curl_setopt ($ ch , CURLOPT_PROXYPORT , $ this ->proxy ["port " ]);
3084
3091
}
3085
3092
0 commit comments