From c7463fcf2b008029f6152aa1923beac654ee2ebf Mon Sep 17 00:00:00 2001 From: KurimuzonAkuma Date: Sun, 7 Jan 2024 14:46:55 +0300 Subject: [PATCH] Fix message.topic parsing in some cases --- pyrogram/types/messages_and_media/message.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyrogram/types/messages_and_media/message.py b/pyrogram/types/messages_and_media/message.py index 93b38fa5..b8d6cca5 100644 --- a/pyrogram/types/messages_and_media/message.py +++ b/pyrogram/types/messages_and_media/message.py @@ -25,7 +25,7 @@ import pyrogram from pyrogram import raw, enums from pyrogram import types from pyrogram import utils -from pyrogram.errors import MessageIdsEmpty, PeerIdInvalid, ChannelPrivate, BotMethodInvalid +from pyrogram.errors import MessageIdsEmpty, PeerIdInvalid, ChannelPrivate, BotMethodInvalid, ChannelForumMissing from pyrogram.parser import utils as parser_utils, Parser from ..object import Object from ..update import Update @@ -1131,7 +1131,7 @@ class Message(Object, Update): chat_id=parsed_message.chat.id, topic_ids=parsed_message.message_thread_id or 1 ) - except BotMethodInvalid: + except (BotMethodInvalid, ChannelForumMissing): pass if not parsed_message.poll: # Do not cache poll messages