Remove unused argument

merge-requests/30/head
Bob Mottram 2024-02-28 19:44:47 +00:00
parent 3cc74121e8
commit 86f5777351
3 changed files with 8 additions and 11 deletions

View File

@ -7338,17 +7338,15 @@ class PubServer(BaseHTTPRequestHandler):
# change gemini link # change gemini link
current_gemini_link = \ current_gemini_link = \
get_gemini_link(actor_json, self.server.translate) get_gemini_link(actor_json)
if fields.get('geminiLink'): if fields.get('geminiLink'):
if fields['geminiLink'] != current_gemini_link: if fields['geminiLink'] != current_gemini_link:
set_gemini_link(actor_json, set_gemini_link(actor_json,
fields['geminiLink'], fields['geminiLink'])
self.server.translate)
actor_changed = True actor_changed = True
else: else:
if current_gemini_link: if current_gemini_link:
set_gemini_link(actor_json, '', set_gemini_link(actor_json, '')
self.server.translate)
actor_changed = True actor_changed = True
# account moved to new address # account moved to new address
@ -9187,8 +9185,7 @@ class PubServer(BaseHTTPRequestHandler):
locked_account = get_locked_account(actor_json) locked_account = get_locked_account(actor_json)
donate_url = get_donation_url(actor_json) donate_url = get_donation_url(actor_json)
website_url = get_website(actor_json, self.server.translate) website_url = get_website(actor_json, self.server.translate)
gemini_link = get_gemini_link(actor_json, gemini_link = get_gemini_link(actor_json)
self.server.translate)
xmpp_address = get_xmpp_address(actor_json) xmpp_address = get_xmpp_address(actor_json)
matrix_address = get_matrix_address(actor_json) matrix_address = get_matrix_address(actor_json)
ssb_address = get_ssb_address(actor_json) ssb_address = get_ssb_address(actor_json)

View File

@ -103,7 +103,7 @@ def get_website(actor_json: {}, translate: {}) -> str:
return '' return ''
def get_gemini_link(actor_json: {}, translate: {}) -> str: def get_gemini_link(actor_json: {}) -> str:
"""Returns a gemini link """Returns a gemini link
""" """
if not actor_json.get('attachment'): if not actor_json.get('attachment'):
@ -255,7 +255,7 @@ def set_website(actor_json: {}, website_url: str, translate: {}) -> None:
actor_json['attachment'].append(new_entry) actor_json['attachment'].append(new_entry)
def set_gemini_link(actor_json: {}, gemini_link: str, translate: {}) -> None: def set_gemini_link(actor_json: {}, gemini_link: str) -> None:
"""Sets a gemini link """Sets a gemini link
""" """
gemini_link = gemini_link.strip() gemini_link = gemini_link.strip()

View File

@ -1038,7 +1038,7 @@ def html_profile(signing_priv_key_pem: str,
donate_url = get_donation_url(profile_json) donate_url = get_donation_url(profile_json)
website_url = get_website(profile_json, translate) website_url = get_website(profile_json, translate)
repo_url = get_repo_url(profile_json) repo_url = get_repo_url(profile_json)
gemini_link = get_gemini_link(profile_json, translate) gemini_link = get_gemini_link(profile_json)
blog_address = get_blog_address(profile_json) blog_address = get_blog_address(profile_json)
enigma_pub_key = get_enigma_pub_key(profile_json) enigma_pub_key = get_enigma_pub_key(profile_json)
pgp_pub_key = get_pgp_pub_key(profile_json) pgp_pub_key = get_pgp_pub_key(profile_json)
@ -3004,7 +3004,7 @@ def html_edit_profile(server, translate: {},
featured_hashtags = get_featured_hashtags(actor_json) featured_hashtags = get_featured_hashtags(actor_json)
donate_url = get_donation_url(actor_json) donate_url = get_donation_url(actor_json)
website_url = get_website(actor_json, translate) website_url = get_website(actor_json, translate)
gemini_link = get_gemini_link(actor_json, translate) gemini_link = get_gemini_link(actor_json)
xmpp_address = get_xmpp_address(actor_json) xmpp_address = get_xmpp_address(actor_json)
matrix_address = get_matrix_address(actor_json) matrix_address = get_matrix_address(actor_json)
ssb_address = get_ssb_address(actor_json) ssb_address = get_ssb_address(actor_json)