From 442dda37ec92b2ad3c532ecb517b6580d58295e2 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Tue, 17 Nov 2026 16:35:03 +0100 Subject: [PATCH] Added ability to specify delivery destination stamp value at identity registration --- LXMF/LXMRouter.py | 3 ++- LXMF/_version.py | 2 +- setup.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/LXMF/LXMRouter.py b/LXMF/LXMRouter.py index 4b7759c..1152957 100644 --- a/LXMF/LXMRouter.py +++ b/LXMF/LXMRouter.py @@ -410,7 +410,7 @@ class LXMRouter: da_thread.setDaemon(True) da_thread.start() - def register_delivery_identity(self, identity, display_name = None, stamp_cost = None): + def register_delivery_identity(self, identity, display_name=None, stamp_cost=None, stamp_value=None): if len(self.delivery_destinations) != 0: RNS.log("Currently only one delivery identity is supported per LXMF router instance", RNS.LOG_ERROR) return None @@ -419,6 +419,7 @@ class LXMRouter: os.makedirs(self.ratchetpath) delivery_destination = RNS.Destination(identity, RNS.Destination.IN, RNS.Destination.SINGLE, APP_NAME, "delivery") + if stamp_value: delivery_destination.set_value(stamp_value) delivery_destination.set_link_cost(self.DELIVERY_LINK_COST) delivery_destination.enable_ratchets(f"{self.ratchetpath}/{RNS.hexrep(delivery_destination.hash, delimit=False)}.ratchets") delivery_destination.set_packet_callback(self.delivery_packet) diff --git a/LXMF/_version.py b/LXMF/_version.py index 67bc602..9c73af2 100644 --- a/LXMF/_version.py +++ b/LXMF/_version.py @@ -1 +1 @@ -__version__ = "1.3.0" +__version__ = "1.3.1" diff --git a/setup.py b/setup.py index 43bcbb8..98f9292 100644 --- a/setup.py +++ b/setup.py @@ -31,6 +31,6 @@ setuptools.setup( 'lxmd=LXMF.Utilities.lxmd:main', ] }, - install_requires=["rns>=1.6.0"], + install_requires=["rns>=1.6.1"], python_requires=">=3.7", )