diff --git a/daemon_get_images.py b/daemon_get_images.py index eb69b7aab..19eb06900 100644 --- a/daemon_get_images.py +++ b/daemon_get_images.py @@ -28,6 +28,7 @@ from flags import is_image_file from daemon_utils import etag_exists from fitnessFunctions import fitness_performance from person import save_person_qrcode +from lxmf import save_lxmf_qrcode def show_avatar_or_banner(self, referer_domain: str, path: str, @@ -498,6 +499,8 @@ def show_qrcode(self, calling_domain: str, path: str, if path.endswith('_lxmf.png'): qr_filename = \ acct_dir(base_dir, nickname, domain) + '/qrcode_lxmf.png' + qrcode_scale = 6 + save_lxmf_qrcode(base_dir, nickname, domain, qrcode_scale) else: if onion_domain: qrcode_domain = onion_domain diff --git a/lxmf.py b/lxmf.py index 2b34bf565..f9223dd00 100644 --- a/lxmf.py +++ b/lxmf.py @@ -29,9 +29,9 @@ def _is_valid_lxmf_address(lxmf_address: str) -> bool: return True -def _save_lxmf_qrcode(base_dir: str, - nickname: str, domain: str, - scale: int = 6) -> bool: +def save_lxmf_qrcode(base_dir: str, + nickname: str, domain: str, + scale: int = 6) -> bool: """Saves a qrcode image for the handle of the person This helps to transfer onion or i2p handles to a mobile device """ @@ -180,6 +180,4 @@ def set_lxmf_address(base_dir: str, nickname: str, domain: str, "value": lxmf_address } actor_json['attachment'].append(new_lxmf_address) - _save_lxmf_qrcode(base_dir, - nickname, domain, - qrcode_scale) + save_lxmf_qrcode(base_dir, nickname, domain, qrcode_scale)