Skip to content

Commit

Permalink
App review requests;
Browse files Browse the repository at this point in the history
  • Loading branch information
stef-coenen committed Oct 4, 2024
1 parent 3c266ec commit 7a9a25c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
3 changes: 1 addition & 2 deletions packages/mobile/ios/HomebaseFeed/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@
<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>
Expand Down
26 changes: 25 additions & 1 deletion 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,6 +507,19 @@ 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;
Expand Down

0 comments on commit 7a9a25c

Please sign in to comment.