mirror of
https://github.com/liamcottle/reticulum-meshchat.git
synced 2026-11-29 19:36:31 -05:00
fix updating display name on lxmf destination
This commit is contained in:
parent
e5410517bc
commit
193a3c0a5e
1 changed files with 7 additions and 0 deletions
7
web.py
7
web.py
|
|
@ -63,6 +63,7 @@ class ReticulumWebChat:
|
|||
# update display name from config
|
||||
if "display_name" in config:
|
||||
self.display_name = config["display_name"]
|
||||
self.set_lxmf_display_name(self.display_name)
|
||||
|
||||
# return loaded config
|
||||
return config
|
||||
|
|
@ -311,6 +312,12 @@ class ReticulumWebChat:
|
|||
"app_data": parsed_app_data,
|
||||
})))
|
||||
|
||||
# sets the app data for the lxmf destination to be the provided display name
|
||||
def set_lxmf_display_name(self, display_name):
|
||||
# could be called before destination is configured, so lets check it exists
|
||||
if hasattr(self, "local_lxmf_destination"):
|
||||
# set app data to display name
|
||||
self.local_lxmf_destination.set_default_app_data(self.display_name.encode("utf-8"))
|
||||
|
||||
# an announce handler for lxmf.delivery aspect that just forwards to a provided callback
|
||||
class LXMFAnnounceHandler:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue