Skip to content

Commit

Permalink
App review requests; (#228)
Browse files Browse the repository at this point in the history
* App review requests;

* Update permissions keys;

* update deps

---------

Co-authored-by: Bishwajeet Parhi <[email protected]>
  • Loading branch information
stef-coenen and 2002Bishwajeet authored Oct 8, 2024
1 parent 26e2b99 commit c2dfa75
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 10 deletions.
15 changes: 7 additions & 8 deletions packages/mobile/ios/HomebaseFeed/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,13 @@
<key>NSAllowsLocalNetworking</key>
<true/>
<key>NSCameraUsageDescription</key>
<string>$(PRODUCT_NAME) would like access to your camera to take secure photos and
video.</string>
<string>Allow access to your camera to take secure photos and video and send them securely over chat</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
<key>NSMicrophoneUsageDescription</key>
<string>$(PRODUCT_NAME) would like access to microphone to record audio</string>
<string>Allow acces to your microphone to record a message and send it securely over chat</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>${PRODUCT_NAME} would like to access gallery</string>
<string>Allow access to your gallery so you can select photos and videos and share them within ${PRODUCT_NAME}</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
Expand All @@ -86,15 +85,15 @@
<string>INSendMessageIntent</string>
</array>
<key>NSAppleMusicUsageDescription</key>
<string>${PRODUCT_NAME} would like to access audio to share it into the app</string>
<string>${PRODUCT_NAME} would like to access audio to send them securely over chat</string>
<key>NSCameraUsageDescription</key>
<string>$(PRODUCT_NAME) would like access to your camera to take secure photos and video.</string>
<string>Allow access to your camera to take secure photos and video and send them securely over chat</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
<key>NSMicrophoneUsageDescription</key>
<string>$(PRODUCT_NAME) would like access to microphone to record audio</string>
<string>Allow acces to your microphone to record a message and send it securely over chat</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>${PRODUCT_NAME} would like to access gallery</string>
<string>Allow access to your gallery so you can select photos and videos and share them within ${PRODUCT_NAME}</string>
<key>UIBackgroundModes</key>
<array>
<string>fetch</string>
Expand Down
36 changes: 34 additions & 2 deletions packages/mobile/src/pages/chat/chat-page.tsx
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -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 };
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit c2dfa75

Please sign in to comment.