From 09416e94f545c670d0c6386064dbe408fa9be6ab Mon Sep 17 00:00:00 2001 From: mihalin Date: Thu, 16 Jun 2022 04:23:57 +0300 Subject: [PATCH] edited message experimental --- server/custom.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/custom.py b/server/custom.py index f79aec0..a585831 100644 --- a/server/custom.py +++ b/server/custom.py @@ -206,6 +206,10 @@ async def message_handler(message: types.Message, *args, **kwargs): return await handle_operator_message(message, super_chat_id, bot) +async def edited_message_handler(message: types.Message, *args, **kwargs): + return await message_handler(message, *args, **kwargs, is_edited=True) + + async def receive_invite(message: types.Message): bot = db_bot_instance.get() for member in message.new_chat_members: @@ -286,7 +290,7 @@ class CustomRequestHandler(WebhookRequestHandler): types.ContentType.VIDEO, types.ContentType.VOICE] dp.register_message_handler(message_handler, content_types=supported_messages) - dp.register_edited_message_handler(message_handler, content_types=supported_messages) + dp.register_edited_message_handler(edited_message_handler, content_types=supported_messages) dp.register_message_handler(receive_invite, content_types=[types.ContentType.NEW_CHAT_MEMBERS]) dp.register_message_handler(receive_left, content_types=[types.ContentType.LEFT_CHAT_MEMBER])