chore: test ios push
This commit is contained in:
parent
afe50aed7e
commit
9c0946eae5
|
@ -19,13 +19,11 @@ interface IEjson {
|
|||
export const onNotification = (push: INotification): void => {
|
||||
const identifier = String(push?.payload?.action?.identifier);
|
||||
if (identifier === 'ACCEPT_ACTION' || identifier === 'DECLINE_ACTION') {
|
||||
if (push?.payload && push?.payload?.ejson) {
|
||||
if (push?.payload?.ejson) {
|
||||
const notification = EJSON.parse(push?.payload?.ejson);
|
||||
store.dispatch(deepLinkingClickCallPush({ ...notification, event: identifier === 'ACCEPT_ACTION' ? 'accept' : 'decline' }));
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (push?.payload) {
|
||||
} else if (push?.payload) {
|
||||
try {
|
||||
const notification = push?.payload;
|
||||
if (notification.ejson) {
|
||||
|
@ -49,13 +47,13 @@ export const onNotification = (push: INotification): void => {
|
|||
path: `${types[type]}/${roomName}`
|
||||
};
|
||||
store.dispatch(deepLinkingOpen(params));
|
||||
return;
|
||||
}
|
||||
} catch (e) {
|
||||
console.warn(e);
|
||||
}
|
||||
} else {
|
||||
store.dispatch(appInit());
|
||||
}
|
||||
store.dispatch(appInit());
|
||||
};
|
||||
|
||||
export const getDeviceToken = (): string => deviceToken;
|
||||
|
|
Loading…
Reference in New Issue