From 68dc6ecab09bf4396c4ec53eb02f7e3162195b5b Mon Sep 17 00:00:00 2001 From: bashrc Date: Mon, 2 Feb 2026 14:55:07 +0000 Subject: [PATCH] Show bot status on profile screens --- webapp_profile.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/webapp_profile.py b/webapp_profile.py index f0c64e800..650fb2248 100644 --- a/webapp_profile.py +++ b/webapp_profile.py @@ -23,6 +23,7 @@ from textmode import text_mode_removals from unicodetext import uninvert_text from unicodetext import standardize_text from occupation import get_occupation_name +from utils import get_actor_type from utils import get_mutuals_of_person from utils import get_person_icon from utils import replace_strings @@ -347,6 +348,12 @@ def html_profile_after_search(authorized: bool, if locked_account: display_name += '🔒' + # is this a bot account? + if profile_json.get('type'): + if isinstance(profile_json['type'], str): + if profile_json['type'] != 'Person': + display_name = '[' + translate['Bot'] + '] ' + display_name + pronouns = get_pronouns(profile_json) discord = get_discord(profile_json) art_site_url = get_art_site_url(profile_json) @@ -1175,6 +1182,13 @@ def html_profile(signing_priv_key_pem: str, add_emoji_to_display_name(session, base_dir, http_prefix, nickname, domain, display_name, False, translate) + + # is this a bot account? + if profile_json.get('type'): + if isinstance(profile_json['type'], str): + if profile_json['type'] != 'Person': + display_name = '[' + translate['Bot'] + '] ' + display_name + domain_full = get_full_domain(domain, port) profile_status = get_actor_status(profile_json) if profile_status: @@ -3909,6 +3923,9 @@ def _individual_follow_as_html(signing_priv_key_pem: str, add_emoji_to_display_name(None, base_dir, http_prefix, actor_nickname, domain, display_name, False, translate) + actor_type = get_actor_type(base_dir, follow_url, person_cache) + if actor_type != 'Person': + display_name = '[' + translate['Bot'] + '] ' + display_name title_str = display_name if offline: