mirror of https://gitlab.com/bashrc2/epicyon
Save lxmf qrcode
parent
08f85d5816
commit
a1748eb17c
|
|
@ -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
|
||||
|
|
|
|||
10
lxmf.py
10
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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue