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, Animated,
Dimensions, Dimensions,
Easing, Easing,
Linking,
Modal, Modal,
Pressable, Pressable,
ScrollView, ScrollView,
@@ -11,6 +10,7 @@ import {
Text, Text,
View, View,
} from 'react-native'; } from 'react-native';
import { openExternalUrl } from '../../lib/open-url';
import { SafeAreaView } from 'react-native-safe-area-context'; import { SafeAreaView } from 'react-native-safe-area-context';
import { import {
AlignLeft, AlignLeft,
@@ -275,7 +275,7 @@ export function EventDetailSheet({
</View> </View>
<Pressable <Pressable
style={styles.joinBtn} 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> <Text style={styles.joinBtnText}>{t('calendar.detail.open_link', 'Open link')}</Text>
</Pressable> </Pressable>
@@ -1,5 +1,6 @@
import React from 'react'; 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 { import {
CalendarPlus, Check, HelpCircle, X, MapPin, Video, Clock, CalendarDays, AlertTriangle, CalendarPlus, Check, HelpCircle, X, MapPin, Video, Clock, CalendarDays, AlertTriangle,
ShieldCheck, ShieldAlert, ChevronDown, 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} /> <Row icon={<MapPin size={15} color={c.textMuted} />} text={location} styles={styles} />
) : null} ) : null}
{videoUri ? ( {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} /> <Video size={15} color={c.textMuted} />
<Text style={[styles.detailText, { color: c.primary }]} numberOfLines={1}> <Text style={[styles.detailText, { color: c.primary }]} numberOfLines={1}>
{t('calendar.invitation.join_video', 'Join video call')} {t('calendar.invitation.join_video', 'Join video call')}