mirror of
https://github.com/danog/MadelineProto.git
synced 2025-01-22 12:51:21 +01:00
Add sendCustomEvent API method and onUpdateCustomEvent event handler method
This commit is contained in:
parent
378a5c0eb0
commit
382cd3f0a7
@ -1350,6 +1350,13 @@ abstract class InternalDoc
|
||||
{
|
||||
return $this->wrapper->getAPI()->secretChatStatus($chat);
|
||||
}
|
||||
/**
|
||||
* Sends an updateCustomEvent update to the event handler.
|
||||
*/
|
||||
public function sendCustomEvent(mixed $payload): void
|
||||
{
|
||||
$this->wrapper->getAPI()->sendCustomEvent($payload);
|
||||
}
|
||||
/**
|
||||
* Set NOOP update handler, ignoring all updates.
|
||||
*/
|
||||
|
@ -630,4 +630,11 @@ trait UpdateHandler
|
||||
UpdateHandlerType::GET_UPDATES => $this->signalUpdate(...),
|
||||
}, $update);
|
||||
}
|
||||
/**
|
||||
* Sends an updateCustomEvent update to the event handler.
|
||||
*/
|
||||
public function sendCustomEvent(mixed $payload): void
|
||||
{
|
||||
$this->handleUpdate(['_' => 'updateCustomEvent', 'payload' => $payload]);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user