Pixelfed' + \ ': ' + \ pixelfed + '
\n' + if discord: + options_str += \ + 'Discord' + \ + ': ' + \ + discord + '
\n' if youtube: options_str += \ 'YouTube' + \ diff --git a/webapp_profile.py b/webapp_profile.py index 8a82ab136..e60b64da2 100644 --- a/webapp_profile.py +++ b/webapp_profile.py @@ -68,6 +68,7 @@ from donate import get_website from donate import get_gemini_link from pronouns import get_pronouns from pixelfed import get_pixelfed +from discord import get_discord from youtube import get_youtube from peertube import get_peertube from xmpp import get_xmpp_address @@ -329,6 +330,7 @@ def html_profile_after_search(authorized: bool, display_name += '🔒' pronouns = get_pronouns(profile_json) + discord = get_discord(profile_json) youtube = get_youtube(profile_json) peertube = get_peertube(profile_json) pixelfed = get_pixelfed(profile_json) @@ -456,7 +458,8 @@ def html_profile_after_search(authorized: bool, authorized, person_url, no_of_books, birth_date, - youtube, peertube, pixelfed) + youtube, peertube, pixelfed, + discord) domain_full = get_full_domain(domain, port) @@ -826,7 +829,8 @@ def _get_profile_header_after_search(base_dir: str, birth_date: str, youtube: str, peertube: str, - pixelfed: str) -> str: + pixelfed: str, + discord: str) -> str: """The header of a searched for handle, containing background image and avatar """ @@ -948,6 +952,9 @@ def _get_profile_header_after_search(base_dir: str, if pixelfed: html_str += '
Pixelfed: ' + \ pixelfed + '
\n' + if discord: + html_str += 'Discord: ' + \ + discord + '
\n' if repo_url: html_str += '💻 ' + \ repo_url + '
\n' @@ -1115,6 +1122,7 @@ def html_profile(signing_priv_key_pem: str, email_address = get_email_address(profile_json) pronouns = get_pronouns(profile_json) pixelfed = get_pixelfed(profile_json) + discord = get_discord(profile_json) youtube = get_youtube(profile_json) peertube = get_peertube(profile_json) xmpp_address = get_xmpp_address(profile_json) @@ -1125,8 +1133,8 @@ def html_profile(signing_priv_key_pem: str, cwtch_address = get_cwtch_address(profile_json) verified_site_checkmark = '✔' premium = is_premium_account(base_dir, nickname, domain) - if donate_url or website_url or repo_url or pronouns or youtube or \ - peertube or pixelfed or xmpp_address or matrix_address or \ + if donate_url or website_url or repo_url or pronouns or discord or \ + youtube or peertube or pixelfed or xmpp_address or matrix_address or \ ssb_address or tox_address or briar_address or cwtch_address or \ pgp_pub_key or enigma_pub_key or pgp_fingerprint or email_address: donate_section = 'Pixelfed: ' + pixelfed + '
\n' + if discord: + donate_section += \ + 'Discord: ' + discord + '
\n' if youtube: donate_section += \ '