mirror of
https://github.com/liamcottle/reticulum-meshchat.git
synced 2026-04-28 00:20:48 +00:00
check for null lxmf display names
This commit is contained in:
parent
6234785438
commit
49ee7de9e5
1 changed files with 7 additions and 2 deletions
|
|
@ -2355,11 +2355,16 @@ class ReticulumMeshChat:
|
|||
|
||||
# reads the lxmf display name from the provided base64 app data
|
||||
def parse_lxmf_display_name(self, app_data_base64: str, default_value: str | None = "Anonymous Peer"):
|
||||
|
||||
try:
|
||||
app_data_bytes = base64.b64decode(app_data_base64)
|
||||
return LXMF.display_name_from_app_data(app_data_bytes)
|
||||
display_name = LXMF.display_name_from_app_data(app_data_bytes)
|
||||
if display_name is not None:
|
||||
return display_name
|
||||
except:
|
||||
return default_value
|
||||
pass
|
||||
|
||||
return default_value
|
||||
|
||||
# reads the lxmf stamp cost from the provided base64 app data
|
||||
def parse_lxmf_stamp_cost(self, app_data_base64: str):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue