Skip to content

Commit

Permalink
add config to set lxmf delivery transfer limit
Browse files Browse the repository at this point in the history
  • Loading branch information
liamcottle committed Aug 2, 2024
1 parent 4abca80 commit c4a2c2d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions meshchat.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ def __init__(self, identity: RNS.Identity, storage_dir, reticulum_config_dir):
self.message_router = LXMF.LXMRouter(identity=self.identity, storagepath=lxmf_router_path)
self.message_router.PROCESSING_INTERVAL = 1

# increase limit for incoming lxmf messages (received over a resource), to allow receiving larger attachments
# the lxmf router expects delivery_per_transfer_limit to be provided in kilobytes, so we will do that...
self.message_router.delivery_per_transfer_limit = self.config.lxmf_delivery_transfer_limit_in_bytes.get() / 1000

# register lxmf identity
self.local_lxmf_destination = self.message_router.register_delivery_identity(self.identity)

Expand Down Expand Up @@ -1925,6 +1929,7 @@ def set(self, value: int):
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)
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 * 1) # 1MB


# an announce handler for lxmf.delivery aspect that just forwards to a provided callback
Expand Down

0 comments on commit c4a2c2d

Please sign in to comment.