Skip to content

Commit 0186409

Browse files
committed
Version 1.7.0
1 parent e95c8d6 commit 0186409

File tree

4 files changed

+23
-7
lines changed

4 files changed

+23
-7
lines changed

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ jobs:
2121
fast_finish: true
2222

2323
notifications:
24-
on_success: never
25-
on_failure: always
24+
email:
25+
on_success: never
26+
on_failure: always
2627
webhooks:
2728
on_success: always
2829
urls:

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,25 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
77
### Notes
88
- [:ledger: View file changes][Unreleased]
99
### Added
10-
- Allow webhook to contain custom query parameters.
1110
### Changed
1211
### Deprecated
1312
### Removed
1413
### Fixed
1514
### Security
1615

16+
## [1.7.0] - 2021-06-14
17+
### Notes
18+
- [:ledger: View file changes][1.7.0]
19+
### Changed
20+
- Bumped core to version 0.73.*.
21+
### Fixed
22+
- `chat_id` output for `getUpdates` method. (#65)
23+
1724
## [1.6.0] - 2020-12-26
1825
### Notes
1926
- [:ledger: View file changes][1.6.0]
27+
### Added
28+
- Allow webhook to contain custom query parameters. (#59)
2029
### Changed
2130
- Upgraded dependencies and bumped core to version 0.70.*.
2231
- Upgrade code to PHP 7.3.
@@ -204,6 +213,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
204213
[0.44.0-bc-parameter-structure]: https://github.com/php-telegram-bot/telegram-bot-manager/wiki/Breaking-backwards-compatibility#parameter-structure-changed "Parameter structure changed"
205214

206215
[Unreleased]: https://github.com/php-telegram-bot/telegram-bot-manager/compare/master...develop
216+
[1.7.0]: https://github.com/php-telegram-bot/telegram-bot-manager/compare/1.6.0...1.7.0
207217
[1.6.0]: https://github.com/php-telegram-bot/telegram-bot-manager/compare/1.5.0...1.6.0
208218
[1.5.0]: https://github.com/php-telegram-bot/telegram-bot-manager/compare/1.4.0...1.5.0
209219
[1.4.0]: https://github.com/php-telegram-bot/telegram-bot-manager/compare/1.3.0...1.4.0

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
],
2020
"require": {
2121
"php": "^7.3|^8.0",
22-
"longman/telegram-bot": "^0.70",
22+
"longman/telegram-bot": "^0.73",
2323
"longman/ip-tools": "^1.2",
2424
"psr/log": "^1.1"
2525
},

src/BotManager.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828

2929
class BotManager
3030
{
31+
public const VERSION = '1.7.0';
32+
3133
/**
3234
* @link https://core.telegram.org/bots/webhooks#the-short-version
3335
* @var array Telegram webhook servers IP ranges
@@ -503,12 +505,15 @@ protected function defaultGetUpdatesCallback($get_updates_response): string
503505
} elseif ($update_content instanceof CallbackQuery) {
504506
/** @var CallbackQuery $update_content */
505507
$message = $update_content->getMessage();
506-
$chat_id = ($message && $message->getChat()) ? $message->getChat()->getId() : null;
507-
$text .= ";{$update_content->getData()}";
508+
if ($message && $message->getChat()) {
509+
$chat_id = $message->getChat()->getId();
510+
}
511+
512+
$text .= ";{$update_content->getData()}";
508513
}
509514

510515
$output .= sprintf(
511-
'%d: <%s>' . PHP_EOL,
516+
'%s: <%s>' . PHP_EOL,
512517
$chat_id,
513518
preg_replace('/\s+/', ' ', trim($text))
514519
);

0 commit comments

Comments
 (0)