mirror of
https://git.quad4.io/RNS-Things/MeshChatX.git
synced 2026-05-14 13:15:04 +00:00
fix(identity_context): guard inbound stamp cost comparison against non-int values
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user