Skip to content

Commit 1b83703

Browse files
committed
Merge 0.54.1 hotfix into bot_api_4.0_passport
2 parents 8f0bd3d + 70198f8 commit 1b83703

File tree

5 files changed

+38
-30
lines changed

5 files changed

+38
-30
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
1414
### Fixed
1515
### Security
1616

17+
## [0.54.1] - 2018-10-23
18+
### Fixed
19+
- `sendToActiveChats` now works correctly for any valid Request action.
20+
1721
## [0.54.0] - 2018-07-21
1822
:exclamation: After updating to this version, you will need to execute the [SQL migration script][0.54.0-sql-migration] on your database.
1923
### Added
@@ -235,6 +239,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
235239
[example-bot]: https://github.com/php-telegram-bot/example-bot
236240

237241
[Unreleased]: https://github.com/php-telegram-bot/core/compare/master...develop
242+
[0.54.1]: https://github.com/php-telegram-bot/core/compare/0.54.0...0.54.1
238243
[0.54.0]: https://github.com/php-telegram-bot/core/compare/0.53.0...0.54.0
239244
[0.53.0]: https://github.com/php-telegram-bot/core/compare/0.52.0...0.53.0
240245
[0.52.0]: https://github.com/php-telegram-bot/core/compare/0.51.0...0.52.0

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,13 @@
2626
"php": "^5.5|^7.0",
2727
"ext-pdo": "*",
2828
"ext-curl": "*",
29+
"ext-json": "*",
2930
"ext-mbstring": "*",
3031
"monolog/monolog": "^1.23",
3132
"guzzlehttp/guzzle": "^6.3"
3233
},
3334
"require-dev": {
34-
"phpunit/phpunit": "^4.8|^5.7|^6.5|^7.2",
35+
"phpunit/phpunit": "^4.8|^5.7|^6.5|^7.4",
3536
"squizlabs/php_codesniffer": "^3.3"
3637
},
3738
"autoload": {

composer.lock

Lines changed: 28 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Request.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -607,17 +607,15 @@ public static function sendToActiveChats(
607607
array $data,
608608
array $select_chats_params
609609
) {
610-
if (!method_exists(Request::class, $callback_function)) {
611-
throw new TelegramException('Method "' . $callback_function . '" not found in class Request.');
612-
}
610+
self::ensureValidAction($callback_function);
613611

614612
$chats = DB::selectChats($select_chats_params);
615613

616614
$results = [];
617615
if (is_array($chats)) {
618616
foreach ($chats as $row) {
619617
$data['chat_id'] = $row['chat_id'];
620-
$results[] = call_user_func(Request::class . '::' . $callback_function, $data);
618+
$results[] = self::send($callback_function, $data);
621619
}
622620
}
623621

src/Telegram.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Telegram
3030
*
3131
* @var string
3232
*/
33-
protected $version = '0.54.0';
33+
protected $version = '0.54.1';
3434

3535
/**
3636
* Telegram API key

0 commit comments

Comments
 (0)