fix channel_username retrieval to use sender_chat instead of chat in PostParser

This commit is contained in:
vvzvlad
2025-04-18 05:02:25 +03:00
parent 9e394b28e2
commit bbeab1fb33
+1 -1
View File
@@ -310,7 +310,7 @@ class PostParser:
if len(reply_text) > 100:
reply_text = reply_text[:100] + '...'
channel_username = getattr(reply_to.chat, "username", None)
channel_username = getattr(reply_to.sender_chat, "username", None)
if channel_username:
reply_link = f'<a href="https://t.me/{channel_username}/{reply_to.id}">#{reply_to.id}</a>'
return f'<div class="message-reply">Reply to {reply_link}: {reply_text}</div><br>'