diff --git a/meshchat.py b/meshchat.py index 5f35fbd..e00e0fc 100644 --- a/meshchat.py +++ b/meshchat.py @@ -1291,6 +1291,10 @@ class ReticulumMeshChat: value = bool(data["allow_auto_resending_failed_messages_with_attachments"]) self.config.allow_auto_resending_failed_messages_with_attachments.set(value) + if "auto_send_failed_messages_to_propagation_node" in data: + value = bool(data["auto_send_failed_messages_to_propagation_node"]) + self.config.auto_send_failed_messages_to_propagation_node.set(value) + if "show_suggested_community_interfaces" in data: value = bool(data["show_suggested_community_interfaces"]) self.config.show_suggested_community_interfaces.set(value) @@ -1470,6 +1474,7 @@ class ReticulumMeshChat: "last_announced_at": self.config.last_announced_at.get(), "auto_resend_failed_messages_when_announce_received": self.config.auto_resend_failed_messages_when_announce_received.get(), "allow_auto_resending_failed_messages_with_attachments": self.config.allow_auto_resending_failed_messages_with_attachments.get(), + "auto_send_failed_messages_to_propagation_node": self.config.auto_send_failed_messages_to_propagation_node.get(), "show_suggested_community_interfaces": self.config.show_suggested_community_interfaces.get(), "lxmf_preferred_propagation_node_destination_hash": self.config.lxmf_preferred_propagation_node_destination_hash.get(), "lxmf_preferred_propagation_node_auto_sync_interval_seconds": self.config.lxmf_preferred_propagation_node_auto_sync_interval_seconds.get(), @@ -1844,7 +1849,7 @@ class ReticulumMeshChat: # create lxmf message lxmf_message = LXMF.LXMessage(lxmf_destination, self.local_lxmf_destination, content, desired_method=LXMF.LXMessage.DIRECT) - lxmf_message.try_propagation_on_fail = True + lxmf_message.try_propagation_on_fail = self.config.auto_send_failed_messages_to_propagation_node.get() lxmf_message.fields = {} @@ -2242,6 +2247,7 @@ class Config: last_announced_at = IntConfig("last_announced_at", None) auto_resend_failed_messages_when_announce_received = BoolConfig("auto_resend_failed_messages_when_announce_received", True) allow_auto_resending_failed_messages_with_attachments = BoolConfig("allow_auto_resending_failed_messages_with_attachments", False) + auto_send_failed_messages_to_propagation_node = BoolConfig("auto_send_failed_messages_to_propagation_node", False) show_suggested_community_interfaces = BoolConfig("show_suggested_community_interfaces", True) lxmf_delivery_transfer_limit_in_bytes = IntConfig("lxmf_delivery_transfer_limit_in_bytes", 1000 * 1000 * 10) # 10MB lxmf_preferred_propagation_node_destination_hash = StringConfig("lxmf_preferred_propagation_node_destination_hash", None) diff --git a/src/frontend/components/settings/SettingsPage.vue b/src/frontend/components/settings/SettingsPage.vue index f065ca1..d2e1b55 100644 --- a/src/frontend/components/settings/SettingsPage.vue +++ b/src/frontend/components/settings/SettingsPage.vue @@ -27,6 +27,16 @@
When enabled, failed messages that have attachments are allowed to auto resend.
+
+
+
+ +
+ +
+
When enabled, messages that fail to send will be sent to the configured propagation node.
+
+ @@ -69,7 +79,7 @@
-
When provided, messages that fail to send will automatically send to this propagation node.
+
This is the propagation node your messages will be sent to and retrieved from.
@@ -110,6 +120,7 @@ export default { config: { auto_resend_failed_messages_when_announce_received: null, allow_auto_resending_failed_messages_with_attachments: null, + auto_send_failed_messages_to_propagation_node: null, show_suggested_community_interfaces: null, lxmf_preferred_propagation_node_destination_hash: null, }, @@ -167,6 +178,11 @@ export default { "allow_auto_resending_failed_messages_with_attachments": this.config.allow_auto_resending_failed_messages_with_attachments, }); }, + async onAutoSendFailedMessagesToPropagationNodeChange() { + await this.updateConfig({ + "auto_send_failed_messages_to_propagation_node": this.config.auto_send_failed_messages_to_propagation_node, + }); + }, async onShowSuggestedCommunityInterfacesChange() { await this.updateConfig({ "show_suggested_community_interfaces": this.config.show_suggested_community_interfaces,