From c2dfa752ac1f83a78f738b94172f240db66b9666 Mon Sep 17 00:00:00 2001 From: Stef Coenen Date: Tue, 8 Oct 2024 07:52:32 +0200 Subject: [PATCH] App review requests; (#228) * App review requests; * Update permissions keys; * update deps --------- Co-authored-by: Bishwajeet Parhi --- packages/mobile/ios/HomebaseFeed/Info.plist | 15 ++++---- packages/mobile/src/pages/chat/chat-page.tsx | 36 ++++++++++++++++++-- 2 files changed, 41 insertions(+), 10 deletions(-) diff --git a/packages/mobile/ios/HomebaseFeed/Info.plist b/packages/mobile/ios/HomebaseFeed/Info.plist index a96cf651..4dbe12c3 100644 --- a/packages/mobile/ios/HomebaseFeed/Info.plist +++ b/packages/mobile/ios/HomebaseFeed/Info.plist @@ -58,14 +58,13 @@ NSAllowsLocalNetworking NSCameraUsageDescription - $(PRODUCT_NAME) would like access to your camera to take secure photos and - video. + Allow access to your camera to take secure photos and video and send them securely over chat NSLocationWhenInUseUsageDescription NSMicrophoneUsageDescription - $(PRODUCT_NAME) would like access to microphone to record audio + Allow acces to your microphone to record a message and send it securely over chat NSPhotoLibraryUsageDescription - ${PRODUCT_NAME} would like to access gallery + Allow access to your gallery so you can select photos and videos and share them within ${PRODUCT_NAME} UILaunchStoryboardName LaunchScreen UIRequiredDeviceCapabilities @@ -86,15 +85,15 @@ INSendMessageIntent NSAppleMusicUsageDescription - ${PRODUCT_NAME} would like to access audio to share it into the app + ${PRODUCT_NAME} would like to access audio to send them securely over chat NSCameraUsageDescription - $(PRODUCT_NAME) would like access to your camera to take secure photos and video. + Allow access to your camera to take secure photos and video and send them securely over chat NSLocationWhenInUseUsageDescription NSMicrophoneUsageDescription - $(PRODUCT_NAME) would like access to microphone to record audio + Allow acces to your microphone to record a message and send it securely over chat NSPhotoLibraryUsageDescription - ${PRODUCT_NAME} would like to access gallery + Allow access to your gallery so you can select photos and videos and share them within ${PRODUCT_NAME} UIBackgroundModes fetch diff --git a/packages/mobile/src/pages/chat/chat-page.tsx b/packages/mobile/src/pages/chat/chat-page.tsx index ef2eef81..b7f4817a 100644 --- a/packages/mobile/src/pages/chat/chat-page.tsx +++ b/packages/mobile/src/pages/chat/chat-page.tsx @@ -1,5 +1,11 @@ import { NativeStackScreenProps } from '@react-navigation/native-stack'; -import { FailedTransferStatuses, HomebaseFile, RichText } from '@homebase-id/js-lib/core'; +import { + ApiType, + DotYouClient, + FailedTransferStatuses, + HomebaseFile, + RichText, +} from '@homebase-id/js-lib/core'; import { memo, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { @@ -58,6 +64,7 @@ import { RetryModal } from '../../components/Chat/Reactions/Modal/RetryModal'; import { getPlainTextFromRichText, t, useDotYouClientContext } from 'homebase-id-app-common'; import { useWebSocketContext } from '../../components/WebSocketContext/useWebSocketContext'; import { LinkPreview } from '@homebase-id/js-lib/media'; +import { openURL } from '../../utils/utils'; export type SelectedMessageState = { messageCordinates: { x: number; y: number }; @@ -443,6 +450,10 @@ const ChatPage = memo(({ route, navigation }: ChatProp) => { const [isOpen, setIsOpen] = useState(false); const { isDarkMode } = useDarkMode(); + const host = new DotYouClient({ + api: ApiType.Guest, + identity: identity || undefined, + }).getRoot(); const chatOptions: { label: string; onPress: () => void; @@ -496,12 +507,33 @@ const ChatPage = memo(({ route, navigation }: ChatProp) => { }, } : undefined, + { + label: `${t('Report')}`, + onPress: async () => { + //TODO: Update to use the report endpoint + openURL('https://ravenhosting.cloud/report/content'); + }, + }, + { + label: `${t('Block this user')}`, + onPress: () => { + openURL(`${host}/owner/connections/${filteredRecipients?.[0]}/block`); + }, + }, ].filter(Boolean) as { label: string; onPress: () => void; }[], - [clearChat, conversation, deleteChat, navigation, route.params.convoId] + [ + clearChat, + conversation, + deleteChat, + filteredRecipients, + host, + navigation, + route.params.convoId, + ] ); if (!conversation) {