From 9db1b4ce3df4026d4150af369061fd8e4797ea2b Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 15 May 2025 17:25:50 +0100 Subject: [PATCH] Show actor status after search --- webapp_profile.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/webapp_profile.py b/webapp_profile.py index 74968da67..7fd6202ff 100644 --- a/webapp_profile.py +++ b/webapp_profile.py @@ -361,6 +361,18 @@ def html_profile_after_search(authorized: bool, search_nickname, search_domain_full) + profile_status = '' + if profile_json.get('sm:status'): + if isinstance(profile_json['sm:status'], str): + profile_status = remove_html(profile_json['sm:status']) + if len(profile_status) < 100: + profile_status = standardize_text(profile_status) + profile_status = \ + remove_link_trackers_from_content(profile_status) + profile_status = \ + add_emoji_to_display_name(session, base_dir, http_prefix, + nickname, domain, + profile_status, False, translate) profile_description = '' if profile_json.get('summary'): if not dangerous_markup(profile_json['summary'], @@ -455,6 +467,7 @@ def html_profile_after_search(authorized: bool, translate, display_name, pronouns, you_follow, follows_you, + profile_status, profile_description_short, featured_hashtags, avatar_url, image_url, @@ -830,6 +843,7 @@ def _get_profile_header_after_search(base_dir: str, pronouns: str, you_follow: bool, follows_you: bool, + profile_status: str, profile_description_short: str, featured_hashtags: str, avatar_url: str, image_url: str, @@ -985,6 +999,8 @@ def _get_profile_header_after_search(base_dir: str, if repo_url: html_str += '

💻 ' + \ repo_url + '

\n' + if profile_status: + html_str += '

' + profile_status + '

\n' html_str += \ '

' + profile_description_short + '

\n' + \ featured_hashtags