diff --git a/client/react-native/android/app/src/main/java/chat/berty/core/notification/NotificationHandler.java b/client/react-native/android/app/src/main/java/chat/berty/core/notification/NotificationHandler.java index afae3b9e95..fe181b7c66 100644 --- a/client/react-native/android/app/src/main/java/chat/berty/core/notification/NotificationHandler.java +++ b/client/react-native/android/app/src/main/java/chat/berty/core/notification/NotificationHandler.java @@ -14,6 +14,7 @@ import java.util.Map; +import chat.berty.core.Level; import chat.berty.core.Logger; import core.Core; import core.MobileNotification; @@ -34,7 +35,12 @@ public class NotificationHandler extends FirebaseMessagingService implements Act public void onMessageReceived(RemoteMessage remoteMessage) { Map map = remoteMessage.getData(); String data = new Gson().toJson(map); - this.notificationDriver.receive(data); + try { + Core.getDeviceInfo().setStoragePath(getApplicationContext().getFilesDir().getAbsolutePath()); + this.notificationDriver.receive(data); + } catch (Exception err) { + this.logger.format(Level.ERROR, TAG, "cannot get storage path: %s", err); + } } /** diff --git a/core/push/fcm.go b/core/push/fcm.go index 9115dbf97f..4d43e69a95 100644 --- a/core/push/fcm.go +++ b/core/push/fcm.go @@ -64,12 +64,11 @@ func (d *FCMDispatcher) Dispatch(pushAttrs *PushData, pushDestination *PushDesti payload := Payload{Chunk: base64.StdEncoding.EncodeToString(chunk)} deviceToken := fcmIdentifier.DeviceToken - if _, err := d.client.NewFcmMsgTo(deviceToken, payload).Send(); err != nil { return errorcodes.ErrPushProvider.Wrap(err) } } - + logger().Info("push notifications with chunk send") return nil }