1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-30 10:59:02 +01:00

handle sendMessageGamePlayAction

This commit is contained in:
َAhJ 2023-09-07 00:56:29 +03:30
parent 852ed232bd
commit 9f80939575

View File

@ -16,6 +16,7 @@
namespace danog\MadelineProto\EventHandler;
use danog\MadelineProto\EventHandler\Action\Cancel;
use danog\MadelineProto\EventHandler\Action\ChooseContact;
use danog\MadelineProto\EventHandler\Action\ChooseSticker;
use danog\MadelineProto\EventHandler\Action\EmojiSeen;
@ -56,7 +57,8 @@ abstract class Action implements JsonSerializable
}
return match ($type) {
'sendMessageTypingAction' => new Typing,
'sendMessageCancelAction' => new GamePlay,
'sendMessageCancelAction' => new Cancel,
'sendMessageGamePlayAction' => new GamePlay,
'sendMessageGeoLocationAction' => new GeoLocation,
'sendMessageChooseContactAction' => new ChooseContact,
'sendMessageChooseStickerAction' => new ChooseSticker,
@ -79,7 +81,8 @@ abstract class Action implements JsonSerializable
{
return match (true) {
$this instanceof Typing => [ '_' => 'sendMessageTypingAction' ],
$this instanceof GamePlay => [ '_' => 'sendMessageCancelAction' ],
$this instanceof Cancel => [ '_' => 'sendMessageCancelAction' ],
$this instanceof GamePlay => [ '_' => 'sendMessageGamePlayAction' ],
$this instanceof GeoLocation => [ '_' => 'sendMessageGeoLocationAction' ],
$this instanceof ChooseContact => [ '_' => 'sendMessageChooseContactAction' ],
$this instanceof ChooseSticker => [ '_' => 'sendMessageChooseStickerAction' ],