Fix message parsing in case of reply from private chat

This commit is contained in:
KurimuzonAkuma 2024-03-06 22:41:33 +03:00
parent c16c83abc3
commit 27b24d49ad

View File

@ -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, ChannelForumMissing
from pyrogram.errors import ChannelPrivate, MessageIdsEmpty, PeerIdInvalid, ChannelPrivate, BotMethodInvalid, ChannelForumMissing
from pyrogram.parser import utils as parser_utils, Parser
from ..object import Object
from ..update import Update
@ -1120,6 +1120,8 @@ class Message(Object, Update):
pass
if reply_to_message and not reply_to_message.forum_topic_created:
parsed_message.reply_to_message = reply_to_message
except ChannelPrivate:
pass
except MessageIdsEmpty:
pass
elif parsed_message.reply_to_story_id: