From 96272b6e17febed056732c90843d4cafdd75c4a1 Mon Sep 17 00:00:00 2001 From: Linus Rath <139418639+rathlinus@users.noreply.github.com> Date: Sat, 29 Aug 2026 18:56:46 +0200 Subject: [PATCH] fix: confirm the host before opening meeting links from calendar events and invitations --- src/components/calendar/EventDetailSheet.tsx | 4 ++-- src/components/email/CalendarInvitationBanner.tsx | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/calendar/EventDetailSheet.tsx b/src/components/calendar/EventDetailSheet.tsx index b5c5bd37..959fc9d0 100644 --- a/src/components/calendar/EventDetailSheet.tsx +++ b/src/components/calendar/EventDetailSheet.tsx @@ -3,7 +3,6 @@ import { Animated, Dimensions, Easing, - Linking, Modal, Pressable, ScrollView, @@ -11,6 +10,7 @@ import { Text, View, } from 'react-native'; +import { openExternalUrl } from '../../lib/open-url'; import { SafeAreaView } from 'react-native-safe-area-context'; import { AlignLeft, @@ -275,7 +275,7 @@ export function EventDetailSheet({ { void Linking.openURL(videoUri); }} + onPress={() => { void openExternalUrl(videoUri, { confirm: true }); }} > {t('calendar.detail.open_link', 'Open link')} diff --git a/src/components/email/CalendarInvitationBanner.tsx b/src/components/email/CalendarInvitationBanner.tsx index e8b0f030..c34c6b97 100644 --- a/src/components/email/CalendarInvitationBanner.tsx +++ b/src/components/email/CalendarInvitationBanner.tsx @@ -1,5 +1,6 @@ import React from 'react'; -import { View, Text, StyleSheet, Pressable, ActivityIndicator, Linking } from 'react-native'; +import { View, Text, StyleSheet, Pressable, ActivityIndicator } from 'react-native'; +import { openExternalUrl } from '../../lib/open-url'; import { CalendarPlus, Check, HelpCircle, X, MapPin, Video, Clock, CalendarDays, AlertTriangle, ShieldCheck, ShieldAlert, ChevronDown, @@ -256,7 +257,7 @@ export function CalendarInvitationBanner({ email, jmapAccountId }: Props) { } text={location} styles={styles} /> ) : null} {videoUri ? ( - { void Linking.openURL(videoUri); }}> + { void openExternalUrl(videoUri, { confirm: true }); }}>