Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
205 changes: 84 additions & 121 deletions packages/react-native-sdk/CLAUDE.md

Large diffs are not rendered by default.

5 changes: 0 additions & 5 deletions packages/react-native-sdk/jest-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ jest.mock('react-native/Libraries/Utilities/Platform', () => ({
},
}));

// Mock the notifee module using the mock provided by @notifee/react-native itself
jest.mock('@notifee/react-native', () =>
require('@notifee/react-native/jest-mock'),
);

jest.mock('react-native-reanimated', () => {
const RNReanimatedmock = require('react-native-reanimated/mock');
return { ...RNReanimatedmock, runOnUI: (fn: any) => fn };
Expand Down
10 changes: 0 additions & 10 deletions packages/react-native-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@
"text-encoding-polyfill": "0.6.7"
},
"peerDependencies": {
"@notifee/react-native": ">=9.0.0",
"@react-native-community/netinfo": ">=9.0.0",
"@react-native-community/push-notification-ios": ">=1.11.0",
"@react-native-firebase/app": ">=17.5.0",
"@react-native-firebase/messaging": ">=17.5.0",
"@stream-io/noise-cancellation-react-native": ">=0.1.0",
Expand All @@ -77,12 +75,6 @@
"react-native-svg": ">=13.6.0"
},
"peerDependenciesMeta": {
"@notifee/react-native": {
"optional": true
},
"@react-native-community/push-notification-ios": {
"optional": true
},
"@react-native-firebase/app": {
"optional": true
},
Expand Down Expand Up @@ -119,9 +111,7 @@
"@expo/config-plugins": "54.0.2",
"@expo/config-types": "^54.0.8",
"@expo/plist": "^0.4.7",
"@notifee/react-native": "9.1.8",
"@react-native-community/netinfo": "11.4.1",
"@react-native-community/push-notification-ios": "1.11.0",
"@react-native-firebase/app": "^23.4.0",
"@react-native-firebase/messaging": "^23.4.0",
"@react-native/babel-preset": "^0.81.5",
Expand Down
4 changes: 0 additions & 4 deletions packages/react-native-sdk/src/hooks/push/index.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
import { useIosVoipPushEventsSetupEffect } from './useIosVoipPushEventsSetupEffect';
import { useInitAndroidTokenAndRest } from './useInitAndroidTokenAndRest';
import { useIosInitRemoteNotifications } from './useIosInitRemoteNotifications';
import { useProcessPushNonRingingCallEffect } from './useProcessPushNonRingingCallEffect';

/**
* This hook is used to do the initial setup for push notifications.
* It must be used in a component which is a child of StreamVideo from bindings
*/
export const usePushRegisterEffect = () => {
useIosInitRemoteNotifications();
useIosVoipPushEventsSetupEffect();
useProcessPushNonRingingCallEffect();
useInitAndroidTokenAndRest();
};

This file was deleted.

This file was deleted.

22 changes: 0 additions & 22 deletions packages/react-native-sdk/src/utils/StreamVideoRN/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import type { StreamVideoConfig } from './types';
import pushLogoutCallbacks from '../internal/pushLogoutCallback';
import newNotificationCallbacks, {
type NewCallNotificationCallback,
} from '../internal/newNotificationCallbacks';
import { setupIosVoipPushEvents } from '../push/setupIosVoipPushEvents';
import { setupCallingExpEvents } from '../push/setupCallingExpEvents';
import {
Expand Down Expand Up @@ -160,25 +157,6 @@ export class StreamVideoRN {
pushLogoutCallbacks.current = [];
}

/**
* This function is used to add a callback to be called when a new call notification is received.
* @param callback
* @returns Unsubscribe function
*/
static addOnNewCallNotificationListener(
callback: NewCallNotificationCallback,
) {
if (!newNotificationCallbacks.current) {
newNotificationCallbacks.current = [callback];
} else {
newNotificationCallbacks.current.push(callback);
}
return () => {
newNotificationCallbacks.current =
newNotificationCallbacks.current?.filter((cb) => cb !== callback);
};
}

/**
* Play native busy tone for call rejection
*/
Expand Down
44 changes: 0 additions & 44 deletions packages/react-native-sdk/src/utils/StreamVideoRN/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
StreamVideoClient,
type Call,
} from '@stream-io/video-client';
import type { AndroidChannel } from '@notifee/react-native';

export type AndroidChannelConfig = {
id: string;
Expand Down Expand Up @@ -79,17 +78,6 @@ export type StreamVideoConfig = {
* @example "production-fcm-video" or "staging-fcm-video" based on the environment
*/
pushProviderName?: string;
/**
* The notification channel to be used for non ringing calls for Android.
* @example
* {
* id: 'stream_call_notifications',
* name: 'Call notifications',
* importance: AndroidImportance.HIGH,
* sound: 'default',
* }
*/
callChannel?: AndroidChannel;
/**
* The notification channel to be used for incoming calls for Android.
* @example
Expand Down Expand Up @@ -118,33 +106,6 @@ export type StreamVideoConfig = {
* The transformer to be used to transform the call title in the notification for ringing and ongoing calls for Android.
*/
titleTransformer?: (memberName: string, incoming: boolean) => string;
/**
* Functions to create the texts shown in the notification for non ringing calls in Android.
* @example
* getTitle(type, createdUserName) {
if (type === 'call.live_started') {
return `Call went live, it was started by ${createdUserName}`;
} else if (type === 'call.missed') {
return `Missed call from ${createdUserName}`;
} else {
return `${createdUserName} is notifying you about a call`;
}
},
getBody(type, _createdUserName) {
if (type === 'call.missed') {
return 'Missed call!';
} else {
return 'Tap to open the call';
}
},
*/
callNotificationTextGetters?: {
getTitle: (
type: NonRingingPushEvent,
createdUserName: string,
) => string;
getBody: (type: NonRingingPushEvent, createdUserName: string) => string;
};
};
/**
* Whether to enable ongoing calls.
Expand Down Expand Up @@ -175,11 +136,6 @@ export type StreamVideoConfig = {
* }
*/
createStreamVideoClient: () => Promise<StreamVideoClient | undefined>;
/** Callback that is called when a non ringing push notification was tapped */
onTapNonRingingCallNotification?: (
call_cid: string,
type: NonRingingPushEvent,
) => void;
};
foregroundService: {
android: {
Expand Down

This file was deleted.

Loading
Loading