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 <noreply@anthropic.com>
fix/252-block-outgoing-dm
Strycher 6 days ago
parent 163ffe35f4
commit f90816c876

@ -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);

Loading…
Cancel
Save

Powered by TurnKey Linux.