mirror of
https://github.com/danog/TelegramApiServer.git
synced 2024-11-26 11:54:42 +01:00
Serialize after changing eventHandlers
This commit is contained in:
parent
354421d7b0
commit
4c942312af
@ -517,9 +517,11 @@ class ApiExtensions
|
||||
public function setEventHandler(): void
|
||||
{
|
||||
Client::getWrapper($this->madelineProto)->getAPI()->setEventHandler(EventHandler::class);
|
||||
Client::getWrapper($this->madelineProto)->serialize();
|
||||
}
|
||||
|
||||
public function getUpdates(array $params): array {
|
||||
public function getUpdates(array $params): array
|
||||
{
|
||||
foreach ($params as $key => $value) {
|
||||
$params[$key] = match($key) {
|
||||
'offset', 'limit' => (int) $value,
|
||||
@ -531,6 +533,18 @@ class ApiExtensions
|
||||
return $this->madelineProto->getUpdates($params);
|
||||
}
|
||||
|
||||
public function setNoop(): void
|
||||
{
|
||||
$this->madelineProto->setNoop();
|
||||
Client::getWrapper($this->madelineProto)->serialize();
|
||||
}
|
||||
|
||||
public function setWebhook(string $url): void
|
||||
{
|
||||
$this->madelineProto->setWebhook($url);
|
||||
Client::getWrapper($this->madelineProto)->serialize();
|
||||
}
|
||||
|
||||
public function unsubscribeFromUpdates(?string $channel = null): array {
|
||||
$inputChannelId = null;
|
||||
if ($channel) {
|
||||
|
Loading…
Reference in New Issue
Block a user