From f90816c876e96db947b2a43e394f381630db3cc1 Mon Sep 17 00:00:00 2001 From: Strycher Date: Wed, 15 Jul 2026 14:32:18 -0400 Subject: [PATCH] fix(#252): drop outgoing DMs to a blocked contact at the send path Adversarial review flagged that the composer swap is UX-only: retry-tap and reaction sends call connector.sendMessage directly, bypassing the hidden composer. Add a block guard at sendMessage (covers normal DMs, reactions, and retries), mirroring the incoming DM-drop so a block is symmetric. The composer notice bar remains the visible affordance. Co-Authored-By: Claude Opus 4.8 --- lib/connector/meshcore_connector.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/connector/meshcore_connector.dart b/lib/connector/meshcore_connector.dart index 19121ed..634fd5b 100644 --- a/lib/connector/meshcore_connector.dart +++ b/lib/connector/meshcore_connector.dart @@ -3078,6 +3078,9 @@ class MeshCoreConnector extends ChangeNotifier { String? translationModelId, }) async { if (!isConnected || text.isEmpty) return; + // Outgoing DMs (incl. reactions and retries) to a blocked contact are + // dropped — mirrors the incoming DM-drop so a block is symmetric (#252). + if (_blockService?.isBlocked(contact.publicKeyHex) ?? false) return; // Check if this is a reaction - apply locally with pending status and route through retry service final reactionInfo = ReactionHelper.parseReaction(text);