fix table notification permision and chat open conversation

This commit is contained in:
Lorito Tiago
2023-10-11 10:18:01 +01:00
parent cca49822b3
commit 3007cf6897
5 changed files with 395 additions and 35 deletions
+8 -2
View File
@@ -73,8 +73,14 @@ export class NotificationsService {
PushNotifications.requestPermissions().then(async (result) => {
if (result.receive === 'granted') {
// Register with Apple / Google to receive push via APNS/FCM
PushNotifications.register();
this.getAndpostToken("")
try {
PushNotifications.register().catch((error) => {
console.log("Register device", error)
})
this.getAndpostToken("")
} catch (error) {
console.log("Granted permission error", error)
}
} else {
// Show some error
}