fix(identity_context): guard inbound stamp cost comparison against non-int values

This commit is contained in:
Ivan
2026-05-09 19:01:12 -05:00
parent cdf2a21897
commit 9671325c50
+20
View File
@@ -217,6 +217,14 @@ class IdentityContext:
# Register LXMF delivery identity
inbound_stamp_cost = self.config.lxmf_inbound_stamp_cost.get()
# Enforce max stamp cost when block strangers is enabled on startup
if (
self.config.block_all_from_strangers.get()
and isinstance(inbound_stamp_cost, int)
and inbound_stamp_cost < 254
):
inbound_stamp_cost = 254
self.config.lxmf_inbound_stamp_cost.set(254)
self.local_lxmf_destination = self.message_router.register_delivery_identity(
identity=self.identity,
display_name=self.config.display_name.get(),
@@ -413,6 +421,18 @@ class IdentityContext:
thread.daemon = True
thread.start()
# start background thread for LXMF flood protection cooldown
thread = threading.Thread(
target=asyncio.run,
args=(
self.app.lxmf_flood_protection_cooldown_loop(
self.session_id, context=self
),
),
)
thread.daemon = True
thread.start()
# start background thread for auto propagation node selection
thread = threading.Thread(
target=asyncio.run,