update forward title handling
This commit is contained in:
+4
-2
@@ -561,11 +561,13 @@ class PostParser:
|
||||
|
||||
text = text.replace('\n', '<br>') # Replace newlines with <br>
|
||||
text = self._add_hyperlinks_to_raw_urls(text)
|
||||
if message.forward_origin:
|
||||
forward_title = message.forward_origin.sender_chat.title or message.forward_origin.sender_chat.username or 'Unknown channel'
|
||||
if text: # Message text
|
||||
content_body.append(f'<div class="message-text">')
|
||||
if message.forward_origin: content_body.append(f"--------- FWD from {message.forward_origin.sender_chat.title} ---------")
|
||||
if message.forward_origin: content_body.append(f"--------- FWD from {forward_title} ---------")
|
||||
content_body.append(f'{text}')
|
||||
if message.forward_origin: content_body.append(f"--------- FWD END from {message.forward_origin.sender_chat.title} ---------")
|
||||
if message.forward_origin: content_body.append(f"--------- FWD END from {forward_title} ---------")
|
||||
content_body.append(f'</div><br>')
|
||||
|
||||
if poll := getattr(message, "poll", None): # Poll message
|
||||
|
||||
Reference in New Issue
Block a user