Fix quoted/retweeted tweet not showing properly

This commit is contained in:
Sonny Bakker 2020-09-27 15:45:23 +02:00
parent 717191617b
commit 655acaa565

View file

@ -75,22 +75,12 @@ class TwitterBuilder(PostBuilder):
if "retweeted_status" in post:
original_post = post["retweeted_status"]
body += urlize(
format_html(
"Original tweet: {original_post}",
original_post=urlize(original_post["full_text"], nofollow=True),
),
nofollow=True,
)
original_tweet = urlize(original_post["full_text"], nofollow=True)
body = f"{body} <br><div>Original tweet: {original_tweet}</div>"
if "quoted_status" in post:
original_post = post["quoted_status"]
body += urlize(
format_html(
"Quoted tweet: {original_post}",
original_post=original_post["full_text"],
),
nofollow=True,
)
original_tweet = urlize(original_post["full_text"], nofollow=True)
body = f"{body} <br><div>Quoted tweet: {original_tweet}</div>"
body = self.sanitize_fragment(body)