Skip to content

Commit 70e6531

Browse files
committed
ios notifs [nfc]: Remove now-unused fromPushNotificationIOS! 🎉
1 parent 8a3ca1a commit 70e6531

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

src/notification/extract.js

-19
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
/* @flow strict-local */
2-
import PushNotificationIOS from '@react-native-community/push-notification-ios';
3-
42
import type { Notification } from './types';
53
import { makeUserId } from '../api/idTypes';
64
import type { JSONableDict, JSONableInput, JSONableInputDict } from '../utils/jsonable';
@@ -170,20 +168,3 @@ export const fromAPNs = (data: ?JSONableDict): Notification | void => {
170168

171169
// Despite the name `fromAPNs`, there is no parallel Android-side `fromFCM`
172170
// function here; the relevant task is performed in `FcmMessage.kt`.
173-
174-
/**
175-
* Extract Zulip notification data from the blob our iOS libraries give us.
176-
*
177-
* On validation error (indicating a bug in either client or server),
178-
* logs a warning and returns void.
179-
*
180-
* On valid but unrecognized input (like a future, unknown type of
181-
* notification event), returns void.
182-
*/
183-
export const fromPushNotificationIOS = (notification: PushNotificationIOS): Notification | void => {
184-
// This is actually typed as ?Object (and so effectively `any`); but if
185-
// present, it must be a JSONable dictionary. It's giving us the
186-
// notification data, which was passed over APNs as JSON.
187-
const data: ?JSONableDict = notification.getData();
188-
return fromAPNs(data);
189-
};

0 commit comments

Comments
 (0)