fix: confirm the host before opening meeting links from calendar events and invitations

This commit is contained in:
Linus Rath
2026-08-29 18:56:46 +02:00
parent 8e33808ded
commit 96272b6e17
2 changed files with 5 additions and 4 deletions
+2 -2
View File
@@ -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({
</View>
<Pressable
style={styles.joinBtn}
onPress={() => { void Linking.openURL(videoUri); }}
onPress={() => { void openExternalUrl(videoUri, { confirm: true }); }}
>
<Text style={styles.joinBtnText}>{t('calendar.detail.open_link', 'Open link')}</Text>
</Pressable>
@@ -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) {
<Row icon={<MapPin size={15} color={c.textMuted} />} text={location} styles={styles} />
) : null}
{videoUri ? (
<Pressable style={styles.detailRow} onPress={() => { void Linking.openURL(videoUri); }}>
<Pressable style={styles.detailRow} onPress={() => { void openExternalUrl(videoUri, { confirm: true }); }}>
<Video size={15} color={c.textMuted} />
<Text style={[styles.detailText, { color: c.primary }]} numberOfLines={1}>
{t('calendar.invitation.join_video', 'Join video call')}