@@ -106,7 +106,7 @@ public function __construct($bot_token, $log_errors = true, array $proxy = [])
106
106
*/
107
107
public function endpoint ($ api , array $ content , $ post = true )
108
108
{
109
- $ url = 'https://api.telegram.org/bot ' . $ this ->bot_token . '/ ' . $ api ;
109
+ $ url = 'https://api.telegram.org/bot ' . $ this ->bot_token . '/ ' . $ api ;
110
110
if ($ post ) {
111
111
$ reply = $ this ->sendAPIRequest ($ url , $ content );
112
112
} else {
@@ -1684,7 +1684,7 @@ public function editMessageReplyMarkup(array $content)
1684
1684
*/
1685
1685
public function downloadFile ($ telegram_file_path , $ local_file_path )
1686
1686
{
1687
- $ file_url = 'https://api.telegram.org/file/bot ' . $ this ->bot_token . '/ ' . $ telegram_file_path ;
1687
+ $ file_url = 'https://api.telegram.org/file/bot ' . $ this ->bot_token . '/ ' . $ telegram_file_path ;
1688
1688
$ in = fopen ($ file_url , 'rb ' );
1689
1689
$ out = fopen ($ local_file_path , 'wb ' );
1690
1690
@@ -1776,6 +1776,7 @@ public function Caption()
1776
1776
if ($ type == self ::CHANNEL_POST ) {
1777
1777
return @$ this ->data ['channel_post ' ]['caption ' ];
1778
1778
}
1779
+
1779
1780
return @$ this ->data ['message ' ]['caption ' ];
1780
1781
}
1781
1782
@@ -2041,6 +2042,7 @@ public function messageFromGroupTitle()
2041
2042
if ($ this ->data ['message ' ]['chat ' ]['type ' ] != 'private ' ) {
2042
2043
return $ this ->data ['message ' ]['chat ' ]['title ' ];
2043
2044
}
2045
+
2044
2046
return '' ;
2045
2047
}
2046
2048
@@ -2056,10 +2058,10 @@ public function messageFromGroupTitle()
2056
2058
public function buildKeyBoard (array $ options , $ onetime = false , $ resize = false , $ selective = true )
2057
2059
{
2058
2060
$ replyMarkup = [
2059
- 'keyboard ' => $ options ,
2061
+ 'keyboard ' => $ options ,
2060
2062
'one_time_keyboard ' => $ onetime ,
2061
- 'resize_keyboard ' => $ resize ,
2062
- 'selective ' => $ selective ,
2063
+ 'resize_keyboard ' => $ resize ,
2064
+ 'selective ' => $ selective ,
2063
2065
];
2064
2066
$ encodedMarkup = json_encode ($ replyMarkup , true );
2065
2067
@@ -2134,8 +2136,8 @@ public function buildInlineKeyboardButton(
2134
2136
public function buildKeyboardButton ($ text , $ request_contact = false , $ request_location = false )
2135
2137
{
2136
2138
$ replyMarkup = [
2137
- 'text ' => $ text ,
2138
- 'request_contact ' => $ request_contact ,
2139
+ 'text ' => $ text ,
2140
+ 'request_contact ' => $ request_contact ,
2139
2141
'request_location ' => $ request_location ,
2140
2142
];
2141
2143
@@ -2152,7 +2154,7 @@ public function buildKeyBoardHide($selective = true)
2152
2154
{
2153
2155
$ replyMarkup = [
2154
2156
'remove_keyboard ' => true ,
2155
- 'selective ' => $ selective ,
2157
+ 'selective ' => $ selective ,
2156
2158
];
2157
2159
$ encodedMarkup = json_encode ($ replyMarkup , true );
2158
2160
@@ -2168,7 +2170,7 @@ public function buildForceReply($selective = true)
2168
2170
{
2169
2171
$ replyMarkup = [
2170
2172
'force_reply ' => true ,
2171
- 'selective ' => $ selective ,
2173
+ 'selective ' => $ selective ,
2172
2174
];
2173
2175
$ encodedMarkup = json_encode ($ replyMarkup , true );
2174
2176
@@ -3169,7 +3171,7 @@ public function getUpdateType()
3169
3171
private function sendAPIRequest ($ url , array $ content , $ post = true )
3170
3172
{
3171
3173
if (isset ($ content ['chat_id ' ])) {
3172
- $ url = $ url . '?chat_id= ' . $ content ['chat_id ' ];
3174
+ $ url = $ url. '?chat_id= ' . $ content ['chat_id ' ];
3173
3175
unset($ content ['chat_id ' ]);
3174
3176
}
3175
3177
$ ch = curl_init ();
@@ -3225,7 +3227,7 @@ private function sendAPIRequest($url, array $content, $post = true)
3225
3227
function curl_file_create ($ filename , $ mimetype = '' , $ postname = '' )
3226
3228
{
3227
3229
return "@ $ filename;filename= "
3228
- . ($ postname ?: basename ($ filename ))
3229
- . ($ mimetype ? ";type= $ mimetype " : '' );
3230
+ .($ postname ?: basename ($ filename ))
3231
+ .($ mimetype ? ";type= $ mimetype " : '' );
3230
3232
}
3231
3233
}
0 commit comments