From 33d31b453f26ffaa587d97028cd9159beb71c49f Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Tue, 5 Jul 2022 15:22:11 +0200 Subject: [PATCH] Updated release compatibility with RNS 0.3.9 --- Makefile | 2 +- sideband/core.py | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index ec2faf9..317d3bd 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ apk: prepare release postbuild devapk: prepare debug postbuild install: - adb install bin/sideband-0.0.1-arm64-v8a-debug.apk + adb install bin/sideband-0.1.4-arm64-v8a-debug.apk console: (adb logcat | grep python) diff --git a/sideband/core.py b/sideband/core.py index 8b3a741..3caadd1 100644 --- a/sideband/core.py +++ b/sideband/core.py @@ -692,6 +692,14 @@ class SidebandCore(): self.rns_dir = RNS.Reticulum.configdir + if self.config["lxmf_propagation_node"] != None and self.config["lxmf_propagation_node"] != "": + self.set_active_propagation_node(self.config["lxmf_propagation_node"]) + else: + if self.config["last_lxmf_propagation_node"] != None and self.config["last_lxmf_propagation_node"] != "": + self.set_active_propagation_node(self.config["last_lxmf_propagation_node"]) + else: + self.set_active_propagation_node(None) + def message_notification(self, message): if message.state == LXMF.LXMessage.FAILED and hasattr(message, "try_propagation_on_fail") and message.try_propagation_on_fail: RNS.log("Direct delivery of "+str(message)+" failed. Retrying as propagated message.", RNS.LOG_VERBOSE) @@ -768,10 +776,10 @@ class SidebandCore(): context_dest = message.source_hash if self._db_message(message.hash): - RNS.log("Message exists, setting state to: "+str(message.state)) + RNS.log("Message exists, setting state to: "+str(message.state), RNS.LOG_DEBUG) self._db_message_set_state(message.hash, message.state) else: - RNS.log("Message does not exist, saving") + RNS.log("Message does not exist, saving", RNS.LOG_DEBUG) self._db_save_lxm(message, context_dest) if self._db_conversation(context_dest) == None: @@ -796,14 +804,6 @@ class SidebandCore(): self._db_clean_messages() self.__start_jobs_immediate() - if self.config["lxmf_propagation_node"] != None and self.config["lxmf_propagation_node"] != "": - self.set_active_propagation_node(self.config["lxmf_propagation_node"]) - else: - if self.config["last_lxmf_propagation_node"] != None and self.config["last_lxmf_propagation_node"] != "": - self.set_active_propagation_node(self.config["last_lxmf_propagation_node"]) - else: - self.set_active_propagation_node(None) - thread = threading.Thread(target=self.__start_jobs_deferred) thread.setDaemon(True) thread.start() @@ -879,7 +879,7 @@ instance_control_port = 37429 panic_on_interface_error = No [logging] -loglevel = 7 +loglevel = 3 [interfaces] [[Default Interface]]