From d254d7b5ab76b35fe100af0c556f1c9ec41aea12 Mon Sep 17 00:00:00 2001 From: Linus Rath <139418639+rathlinus@users.noreply.github.com> Date: Sat, 31 Oct 2026 16:22:11 +0100 Subject: [PATCH] fix: block remote content when the webmail allows no third-party traffic and hide address matching without custom From --- src/components/EmailBodyView.tsx | 20 ++++--- .../custom-from-third-party-wiring.test.ts | 55 +++++++++++++++++++ .../structured-mail/StructuredMailBanner.tsx | 9 ++- src/components/settings/ComposingSettings.tsx | 7 ++- .../settings/ContentSendersSettings.tsx | 9 ++- .../__tests__/org-policy-settings.test.ts | 2 +- src/lib/org-policy.ts | 15 ++++- src/screens/ComposeScreen.tsx | 14 +++-- src/stores/policy-store.ts | 9 +++ 9 files changed, 118 insertions(+), 22 deletions(-) create mode 100644 src/components/__tests__/custom-from-third-party-wiring.test.ts diff --git a/src/components/EmailBodyView.tsx b/src/components/EmailBodyView.tsx index 7acac418..f63e57f6 100644 --- a/src/components/EmailBodyView.tsx +++ b/src/components/EmailBodyView.tsx @@ -20,6 +20,7 @@ import { buildMailTextSizeScript, mailTextFactor } from '../lib/mail-reading'; import { buildPauseAnimatedImagesScript, withReducedMotion } from '../lib/mail-motion'; import { useHasContacts } from '../lib/capabilities'; import { useSettingsStore } from '../stores/settings-store'; +import { useNoThirdPartyTraffic } from '../stores/policy-store'; import { useContactsStore } from '../stores/contacts-store'; import { useLocaleStore } from '../stores/locale-store'; import { spacing, typography, type ThemePalette } from '../theme/tokens'; @@ -437,6 +438,9 @@ export default function EmailBodyView({ const t = useLocaleStore((s) => s.t); const navigation = useNavigation