diff --git a/src/TgBotLib/Classes/Utilities.php b/src/TgBotLib/Classes/Utilities.php index 06a6daa..b16cc27 100644 --- a/src/TgBotLib/Classes/Utilities.php +++ b/src/TgBotLib/Classes/Utilities.php @@ -166,6 +166,11 @@ return UpdateEventType::CHANNEL_POST; } + if($update->getEditedMessage() !== null) + { + return UpdateEventType::EDITED_MESSAGE; + } + 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 a51240d..1e93dea 100644 --- a/src/TgBotLib/Enums/UpdateEventType.php +++ b/src/TgBotLib/Enums/UpdateEventType.php @@ -14,6 +14,7 @@ use TgBotLib\Events\DeletedBusinessMessagesEvent; use TgBotLib\Events\EditedBusinessMessageEvent; use TgBotLib\Events\EditedChannelPostEvent; + use TgBotLib\Events\EditedMessageEvent; use TgBotLib\Events\InlineQueryEvent; use TgBotLib\Events\MessageReactionCountEvent; use TgBotLib\Events\MessageReactionEvent; @@ -49,4 +50,5 @@ case BUSINESS_CONNECTION = BusinessConnectionEvent::class; case EDITED_CHANNEL_POST = EditedChannelPostEvent::class; case CHANNEL_POST = ChannelPostEvent::class; + case EDITED_MESSAGE = EditedMessageEvent::class; } diff --git a/src/TgBotLib/Events/EditedMessageEvent.php b/src/TgBotLib/Events/EditedMessageEvent.php new file mode 100644 index 0000000..65d6e87 --- /dev/null +++ b/src/TgBotLib/Events/EditedMessageEvent.php @@ -0,0 +1,28 @@ +update->getEditedMessage(); + } + } \ No newline at end of file