From 12046c1f56fd517ca8bd7088d2bfc14ff129f549 Mon Sep 17 00:00:00 2001 From: Manuel Cortez Date: Tue, 8 Nov 2022 08:59:09 -0600 Subject: [PATCH] Updated compose function for toots --- src/sessions/mastodon/compose.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/sessions/mastodon/compose.py b/src/sessions/mastodon/compose.py index 7c02815b..4c4656d7 100644 --- a/src/sessions/mastodon/compose.py +++ b/src/sessions/mastodon/compose.py @@ -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]