Add custom_input for getUpdates method.

parent 41cfa0b6
......@@ -10,6 +10,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
### Deprecated
### Removed
### Fixed
- Take `custom_input` into account when using getUpdates method (mainly for testing).
### Security
## [0.44.1] - 2017-04-25
......
......@@ -334,6 +334,10 @@ class Telegram
);
}
//Take custom input into account.
if ($custom_input = $this->getCustomInput()) {
$response = new ServerResponse(json_decode($custom_input, true), $this->bot_username);
} else {
//DB Query
$last_update = DB::selectTelegramUpdate(1);
$last_update = reset($last_update);
......@@ -348,6 +352,7 @@ class Telegram
'timeout' => $timeout,
]
);
}
if ($response->isOk()) {
//Process all updates
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment