Fix quoted/retweeted tweet not showing properly
This commit is contained in:
parent
717191617b
commit
655acaa565
1 changed files with 4 additions and 14 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue