This commit is contained in:
Peter Maquiran
2022-12-21 10:34:15 +01:00
parent 3aff9ff3bc
commit 0af70adda7
5 changed files with 43 additions and 83 deletions
-1
View File
@@ -127,7 +127,6 @@ export class AuthService {
this.ChatSystemService.getAllRooms();
}, 200);
// alert('wsLogin')
}).catch((error) => {
console.error(error)
+1 -42
View File
@@ -17,48 +17,7 @@ export class FcmService {
constructor(private router: Router) { }
/* initPush() {
if (Capacitor.platform !== 'web') {
this.registerPush();
}
}
private registerPush() {
PushNotifications.requestPermission().then((permission) => {
if (permission.granted) {
// Register with Apple / Google to receive push via APNS/FCM
PushNotifications.register();
} else {
// No permission for push granted
}
});
PushNotifications.addListener(
'registration',
(token: PushNotificationToken) => {
}
);
PushNotifications.addListener('registrationError', (error: any) => {
});
PushNotifications.addListener(
'pushNotificationReceived',
async (notification: PushNotification) => {
}
);
PushNotifications.addListener(
'pushNotificationActionPerformed',
async (notification: PushNotificationActionPerformed) => {
const data = notification.notification.data;
if (data.detailsId) {
this.router.navigateByUrl(`/home/notifications/notification-detail${data.detaisId}`);
}
}
);
} */
}