mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-26 12:53:12 -06:00
Updated compose function for toots
This commit is contained in:
parent
6f69426f03
commit
12046c1f56
@ -13,10 +13,13 @@ def compose_toot(toot, db, relative_times, show_screen_names):
|
||||
else:
|
||||
ts = original_date.shift(hours=db["utc_offset"]).format(_("dddd, MMMM D, YYYY H:m:s"), locale="es")
|
||||
if toot.reblog != None:
|
||||
text = "RT @{}: {}".format(toot.reblog.account.acct, utils.html_filter(toot.reblog.content))
|
||||
text = _("Boosted from @{}: {}").format(toot.reblog.account.acct, utils.html_filter(toot.reblog.content))
|
||||
else:
|
||||
text = utils.html_filter(toot.content)
|
||||
source = toot.get("application", "")
|
||||
if source != "":
|
||||
# "" means remote user, None for legacy apps so we should cover both sides.
|
||||
if source != None and source != "":
|
||||
source = source.get("name", "")
|
||||
else:
|
||||
source = ""
|
||||
return [user+", ", text, ts+", ", source]
|
||||
|
Loading…
Reference in New Issue
Block a user