@@ -42,7 +42,7 @@ |
||
| 42 | 42 | |
| 43 | 43 | if ($these_photos = $this->getProperty('photos')) { |
| 44 | 44 | foreach ($these_photos as $photos) { |
| 45 | - $all_photos[] = array_map(function ($photo) { |
|
| 45 | + $all_photos[] = array_map(function($photo) { |
|
| 46 | 46 | return new PhotoSize($photo); |
| 47 | 47 | }, $photos); |
| 48 | 48 | } |
@@ -338,7 +338,7 @@ discard block |
||
| 338 | 338 | 'first_name' => 'botname', |
| 339 | 339 | 'username' => 'namebot', |
| 340 | 340 | ]; |
| 341 | - $data['chat'] = ['id' => $data['chat_id']]; |
|
| 341 | + $data['chat'] = ['id' => $data['chat_id']]; |
|
| 342 | 342 | |
| 343 | 343 | $fake_response['result'] = $data; |
| 344 | 344 | } |
@@ -491,7 +491,7 @@ discard block |
||
| 491 | 491 | '/bot' . self::$telegram->getApiKey() . '/' . $action, |
| 492 | 492 | $request_params |
| 493 | 493 | ); |
| 494 | - $result = (string) $response->getBody(); |
|
| 494 | + $result = (string) $response->getBody(); |
|
| 495 | 495 | |
| 496 | 496 | //Logging getUpdates Update |
| 497 | 497 | if ($action === 'getUpdates') { |
@@ -840,8 +840,8 @@ discard block |
||
| 840 | 840 | $requests = array_map('intval', DB::getTelegramRequestCount($chat_id, $inline_message_id)); |
| 841 | 841 | |
| 842 | 842 | $chat_per_second = ($requests['LIMIT_PER_SEC'] === 0); // No more than one message per second inside a particular chat |
| 843 | - $global_per_second = ($requests['LIMIT_PER_SEC_ALL'] < 30); // No more than 30 messages per second to different chats |
|
| 844 | - $groups_per_minute = (((is_numeric($chat_id) && $chat_id > 0) || $inline_message_id !== null) || ((!is_numeric($chat_id) || $chat_id < 0) && $requests['LIMIT_PER_MINUTE'] < 20)); // No more than 20 messages per minute in groups and channels |
|
| 843 | + $global_per_second = ($requests['LIMIT_PER_SEC_ALL'] < 30); // No more than 30 messages per second to different chats |
|
| 844 | + $groups_per_minute = (((is_numeric($chat_id) && $chat_id > 0) || $inline_message_id !== null) || ((!is_numeric($chat_id) || $chat_id < 0) && $requests['LIMIT_PER_MINUTE'] < 20)); // No more than 20 messages per minute in groups and channels |
|
| 845 | 845 | |
| 846 | 846 | if ($chat_per_second && $global_per_second && $groups_per_minute) { |
| 847 | 847 | break; |