Skip to content

Commit 8dd33e2

Browse files
authored
Merge pull request #1182 from noplanman/1176-fix-request-limiter
Accept chat ID as integer and string for request limiter counter
2 parents 2e1314b + 481d51f commit 8dd33e2

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
1616
### Fixed
1717
- `getUpdates` method wrongly sends only 1 Update when a limit of 0 is passed.
1818
- `Telegram::runCommands()` now passes the correct message text to the commands.
19+
- Request limiter accepts chat ID as integer and string.
1920
### Security
2021

2122
## [0.70.1] - 2020-12-25

src/DB.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1259,13 +1259,13 @@ public static function selectChats($select_chats_params)
12591259
/**
12601260
* Get Telegram API request count for current chat / message
12611261
*
1262-
* @param int|null $chat_id
1263-
* @param string|null $inline_message_id
1262+
* @param int|string|null $chat_id
1263+
* @param string|null $inline_message_id
12641264
*
12651265
* @return array|bool Array containing TOTAL and CURRENT fields or false on invalid arguments
12661266
* @throws TelegramException
12671267
*/
1268-
public static function getTelegramRequestCount(int $chat_id = null, string $inline_message_id = null)
1268+
public static function getTelegramRequestCount($chat_id = null, string $inline_message_id = null)
12691269
{
12701270
if (!self::isDbConnected()) {
12711271
return false;

0 commit comments

Comments
 (0)