Fix push for iOS
This commit is contained in:
parent
9f96136571
commit
fe61d3428b
|
@ -4,11 +4,13 @@ import EJSON from 'ejson';
|
||||||
import { goRoom } from './containers/routes/NavigationService';
|
import { goRoom } from './containers/routes/NavigationService';
|
||||||
|
|
||||||
const handleNotification = (notification) => {
|
const handleNotification = (notification) => {
|
||||||
if (notification.usernInteraction) {
|
if (!notification.userInteraction) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const { rid, name } = EJSON.parse(notification.ejson);
|
const {
|
||||||
return rid && name && goRoom({ rid, name });
|
rid, name, sender, type
|
||||||
|
} = EJSON.parse(notification.ejson || notification.data.ejson);
|
||||||
|
return rid && goRoom({ rid, name: type === 'd' ? sender.username : name });
|
||||||
};
|
};
|
||||||
PushNotification.configure({
|
PushNotification.configure({
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue