@react-native-firebase/messaging 18.4.0 → 18.6.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +12 -0
- package/android/build.gradle +7 -1
- package/lib/index.d.ts +1 -1
- package/lib/remoteMessageOptions.js +15 -1
- package/lib/version.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,18 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
## [18.6.0](https://github.com/invertase/react-native-firebase/compare/v18.5.0...v18.6.0) (2023-10-26)
|
7
|
+
|
8
|
+
### Bug Fixes
|
9
|
+
|
10
|
+
- **android:** required compatibility for Gradle 8 in android modules ([b52d0ce](https://github.com/invertase/react-native-firebase/commit/b52d0ce6723c077190618641ce0f33ced9fd4090))
|
11
|
+
|
12
|
+
## [18.5.0](https://github.com/invertase/react-native-firebase/compare/v18.4.0...v18.5.0) (2023-09-22)
|
13
|
+
|
14
|
+
### Bug Fixes
|
15
|
+
|
16
|
+
- **messaging:** RemoteMessage.data may be JSON-serializable object as well as string ([#7316](https://github.com/invertase/react-native-firebase/issues/7316)) ([7945a24](https://github.com/invertase/react-native-firebase/commit/7945a2485a4a93fa40c509e518da23317a82b489))
|
17
|
+
|
6
18
|
## [18.4.0](https://github.com/invertase/react-native-firebase/compare/v18.3.2...v18.4.0) (2023-09-11)
|
7
19
|
|
8
20
|
**Note:** Version bump only for package @react-native-firebase/messaging
|
package/android/build.gradle
CHANGED
@@ -11,7 +11,7 @@ buildscript {
|
|
11
11
|
}
|
12
12
|
|
13
13
|
dependencies {
|
14
|
-
classpath("com.android.tools.build:gradle:8.1.
|
14
|
+
classpath("com.android.tools.build:gradle:8.1.2")
|
15
15
|
}
|
16
16
|
}
|
17
17
|
}
|
@@ -102,6 +102,12 @@ android {
|
|
102
102
|
firebaseJsonNotificationColor: notificationColor
|
103
103
|
]
|
104
104
|
}
|
105
|
+
|
106
|
+
buildFeatures {
|
107
|
+
// AGP 8 no longer builds config by default
|
108
|
+
buildConfig true
|
109
|
+
}
|
110
|
+
|
105
111
|
lintOptions {
|
106
112
|
disable 'GradleCompatible'
|
107
113
|
abortOnError false
|
package/lib/index.d.ts
CHANGED
@@ -108,7 +108,7 @@ export namespace FirebaseMessagingTypes {
|
|
108
108
|
/**
|
109
109
|
* Any additional data sent with the message.
|
110
110
|
*/
|
111
|
-
data?: { [key: string]: string };
|
111
|
+
data?: { [key: string]: string | object };
|
112
112
|
|
113
113
|
/**
|
114
114
|
* Additional NotificationPayload data sent with the message
|
@@ -65,7 +65,21 @@ export default function remoteMessageOptions(messagingSenderId, remoteMessage) {
|
|
65
65
|
} else if (!isObject(remoteMessage.data)) {
|
66
66
|
throw new Error("'remoteMessage.data' expected an object value");
|
67
67
|
} else {
|
68
|
-
|
68
|
+
// Serialize all objects to strings
|
69
|
+
out.data = {};
|
70
|
+
for (let key in remoteMessage.data) {
|
71
|
+
if (remoteMessage.data.hasOwnProperty(key)) {
|
72
|
+
if (
|
73
|
+
typeof remoteMessage.data[key] === 'object' &&
|
74
|
+
!Array.isArray(remoteMessage.data[key]) &&
|
75
|
+
remoteMessage.data[key] !== null
|
76
|
+
) {
|
77
|
+
out.data[key] = JSON.stringify(remoteMessage.data[key]);
|
78
|
+
} else {
|
79
|
+
out.data[key] = remoteMessage.data[key];
|
80
|
+
}
|
81
|
+
}
|
82
|
+
}
|
69
83
|
}
|
70
84
|
|
71
85
|
if (remoteMessage.collapseKey) {
|
package/lib/version.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
// Generated by genversion.
|
2
|
-
module.exports = '18.
|
2
|
+
module.exports = '18.6.0';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@react-native-firebase/messaging",
|
3
|
-
"version": "18.
|
3
|
+
"version": "18.6.0",
|
4
4
|
"author": "Invertase <oss@invertase.io> (http://invertase.io)",
|
5
5
|
"description": "React Native Firebase - React Native Firebase provides native integration of Firebase Cloud Messaging (FCM) for both Android & iOS. FCM is a cost free service, allowing for server-device and device-device communication. The React Native Firebase Messaging module provides a simple JavaScript API to interact with FCM.",
|
6
6
|
"main": "lib/index.js",
|
@@ -22,10 +22,10 @@
|
|
22
22
|
"messaging"
|
23
23
|
],
|
24
24
|
"peerDependencies": {
|
25
|
-
"@react-native-firebase/app": "18.
|
25
|
+
"@react-native-firebase/app": "18.6.0"
|
26
26
|
},
|
27
27
|
"publishConfig": {
|
28
28
|
"access": "public"
|
29
29
|
},
|
30
|
-
"gitHead": "
|
30
|
+
"gitHead": "adbbd4171adb1e3c2306da1285520abbaf9313b8"
|
31
31
|
}
|