mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-07 15:34:52 +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:
|
else:
|
||||||
parsed_message.message_thread_id = message.reply_to.reply_to_msg_id
|
parsed_message.message_thread_id = message.reply_to.reply_to_msg_id
|
||||||
parsed_message.is_topic_message = True
|
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
|
return parsed_message
|
||||||
|
|
||||||
|
|
@ -1236,6 +1239,9 @@ class Message(Object, Update):
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
parsed_message.reply_to_story = reply_to_story
|
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
|
if not parsed_message.poll: # Do not cache poll messages
|
||||||
client.message_cache[(parsed_message.chat.id, parsed_message.id)] = parsed_message
|
client.message_cache[(parsed_message.chat.id, parsed_message.id)] = parsed_message
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue