File tree Expand file tree Collapse file tree 4 files changed +23
-7
lines changed Expand file tree Collapse file tree 4 files changed +23
-7
lines changed Original file line number Diff line number Diff line change 21
21
fast_finish : true
22
22
23
23
notifications :
24
- on_success : never
25
- on_failure : always
24
+ email :
25
+ on_success : never
26
+ on_failure : always
26
27
webhooks :
27
28
on_success : always
28
29
urls :
Original file line number Diff line number Diff line change @@ -7,16 +7,25 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
7
7
### Notes
8
8
- [ :ledger : View file changes] [ Unreleased ]
9
9
### Added
10
- - Allow webhook to contain custom query parameters.
11
10
### Changed
12
11
### Deprecated
13
12
### Removed
14
13
### Fixed
15
14
### Security
16
15
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
+
17
24
## [ 1.6.0] - 2020-12-26
18
25
### Notes
19
26
- [ :ledger : View file changes] [ 1.6.0 ]
27
+ ### Added
28
+ - Allow webhook to contain custom query parameters. (#59 )
20
29
### Changed
21
30
- Upgraded dependencies and bumped core to version 0.70.* .
22
31
- Upgrade code to PHP 7.3.
@@ -204,6 +213,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
204
213
[ 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 "
205
214
206
215
[ 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
207
217
[ 1.6.0 ] : https://github.com/php-telegram-bot/telegram-bot-manager/compare/1.5.0...1.6.0
208
218
[ 1.5.0 ] : https://github.com/php-telegram-bot/telegram-bot-manager/compare/1.4.0...1.5.0
209
219
[ 1.4.0 ] : https://github.com/php-telegram-bot/telegram-bot-manager/compare/1.3.0...1.4.0
Original file line number Diff line number Diff line change 19
19
],
20
20
"require" : {
21
21
"php" : " ^7.3|^8.0" ,
22
- "longman/telegram-bot" : " ^0.70 " ,
22
+ "longman/telegram-bot" : " ^0.73 " ,
23
23
"longman/ip-tools" : " ^1.2" ,
24
24
"psr/log" : " ^1.1"
25
25
},
Original file line number Diff line number Diff line change 28
28
29
29
class BotManager
30
30
{
31
+ public const VERSION = '1.7.0 ' ;
32
+
31
33
/**
32
34
* @link https://core.telegram.org/bots/webhooks#the-short-version
33
35
* @var array Telegram webhook servers IP ranges
@@ -503,12 +505,15 @@ protected function defaultGetUpdatesCallback($get_updates_response): string
503
505
} elseif ($ update_content instanceof CallbackQuery) {
504
506
/** @var CallbackQuery $update_content */
505
507
$ 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 ()}" ;
508
513
}
509
514
510
515
$ output .= sprintf (
511
- '%d : <%s> ' . PHP_EOL ,
516
+ '%s : <%s> ' . PHP_EOL ,
512
517
$ chat_id ,
513
518
preg_replace ('/\s+/ ' , ' ' , trim ($ text ))
514
519
);
You can’t perform that action at this time.
0 commit comments