diff --git a/web.py b/web.py index b8e633c..e4e5f55 100644 --- a/web.py +++ b/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: