diff --git a/src/TgBotLib/Classes/Utilities.php b/src/TgBotLib/Classes/Utilities.php index 04304c6..9c97e15 100644 --- a/src/TgBotLib/Classes/Utilities.php +++ b/src/TgBotLib/Classes/Utilities.php @@ -156,6 +156,11 @@ return UpdateEventType::BUSINESS_CONNECTION; } + if($update->getEditedChannelPost() !== null) + { + return UpdateEventType::EDITED_CHANNEL_POST; + } + return UpdateEventType::UPDATE_EVENT; } } \ No newline at end of file diff --git a/src/TgBotLib/Enums/UpdateEventType.php b/src/TgBotLib/Enums/UpdateEventType.php index 4cd2790..71c6170 100644 --- a/src/TgBotLib/Enums/UpdateEventType.php +++ b/src/TgBotLib/Enums/UpdateEventType.php @@ -12,6 +12,7 @@ use TgBotLib\Events\ChosenInlineResultEvent; use TgBotLib\Events\DeletedBusinessMessagesEvent; use TgBotLib\Events\EditedBusinessMessageEvent; + use TgBotLib\Events\EditedChannelPostEvent; use TgBotLib\Events\InlineQueryEvent; use TgBotLib\Events\MessageReactionCountEvent; use TgBotLib\Events\MessageReactionEvent; @@ -45,4 +46,5 @@ case EDITED_BUSINESS_MESSAGE = EditedBusinessMessageEvent::class; case BUSINESS_MESSAGE = BusinessMessageEvent::class; case BUSINESS_CONNECTION = BusinessConnectionEvent::class; + case EDITED_CHANNEL_POST = EditedChannelPostEvent::class; } diff --git a/src/TgBotLib/Events/EditedChannelPostEvent.php b/src/TgBotLib/Events/EditedChannelPostEvent.php new file mode 100644 index 0000000..67ff4a8 --- /dev/null +++ b/src/TgBotLib/Events/EditedChannelPostEvent.php @@ -0,0 +1,28 @@ +update->getEditedChannelPost(); + } + } \ No newline at end of file