mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +00:00
pyrofork: Add message_thread_id to general topic messages
Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
parent
d4b904675a
commit
e823160c61
1 changed files with 6 additions and 0 deletions
|
|
@ -921,6 +921,9 @@ class Message(Object, Update):
|
|||
else:
|
||||
parsed_message.message_thread_id = message.reply_to.reply_to_msg_id
|
||||
parsed_message.is_topic_message = True
|
||||
elif parsed_message.chat.is_forum and parsed_message.message_thread_id is None:
|
||||
parsed_message.message_thread_id = 1
|
||||
parsed_message.is_topic_message = True
|
||||
|
||||
return parsed_message
|
||||
|
||||
|
|
@ -1236,6 +1239,9 @@ class Message(Object, Update):
|
|||
pass
|
||||
else:
|
||||
parsed_message.reply_to_story = reply_to_story
|
||||
if parsed_message.chat.is_forum and parsed_message.message_thread_id is None:
|
||||
parsed_message.message_thread_id = 1
|
||||
parsed_message.is_topic_message = True
|
||||
|
||||
if not parsed_message.poll: # Do not cache poll messages
|
||||
client.message_cache[(parsed_message.chat.id, parsed_message.id)] = parsed_message
|
||||
|
|
|
|||
Loading…
Reference in a new issue