@react-native-firebase/messaging 21.0.0 → 21.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,12 @@
|
|
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
|
+
## [21.1.0](https://github.com/invertase/react-native-firebase/compare/v21.0.0...v21.1.0) (2024-10-21)
|
7
|
+
|
8
|
+
### Features
|
9
|
+
|
10
|
+
- **messaging, android:** add priority + originalPriority to RemoteMessage ([c324932](https://github.com/invertase/react-native-firebase/commit/c324932bbfafd32e956e9dae71d32330b37d1e98))
|
11
|
+
|
6
12
|
## [21.0.0](https://github.com/invertase/react-native-firebase/compare/v20.5.0...v21.0.0) (2024-09-26)
|
7
13
|
|
8
14
|
**Note:** Version bump only for package @react-native-firebase/messaging
|
@@ -21,6 +21,8 @@ public class ReactNativeFirebaseMessagingSerializer {
|
|
21
21
|
private static final String KEY_ERROR = "error";
|
22
22
|
private static final String KEY_TO = "to";
|
23
23
|
private static final String KEY_TTL = "ttl";
|
24
|
+
private static final String KEY_PRIORITY = "priority";
|
25
|
+
private static final String KEY_ORIGINAL_PRIORITY = "originalPriority";
|
24
26
|
private static final String EVENT_MESSAGE_SENT = "messaging_message_sent";
|
25
27
|
private static final String EVENT_MESSAGES_DELETED = "messaging_message_deleted";
|
26
28
|
private static final String EVENT_MESSAGE_RECEIVED = "messaging_message_received";
|
@@ -99,6 +101,8 @@ public class ReactNativeFirebaseMessagingSerializer {
|
|
99
101
|
messageMap.putMap(KEY_DATA, dataMap);
|
100
102
|
messageMap.putDouble(KEY_TTL, remoteMessage.getTtl());
|
101
103
|
messageMap.putDouble(KEY_SENT_TIME, remoteMessage.getSentTime());
|
104
|
+
messageMap.putInt(KEY_PRIORITY, remoteMessage.getPriority());
|
105
|
+
messageMap.putInt(KEY_ORIGINAL_PRIORITY, remoteMessage.getOriginalPriority());
|
102
106
|
|
103
107
|
if (remoteMessage.getNotification() != null) {
|
104
108
|
messageMap.putMap(
|
package/lib/index.d.ts
CHANGED
@@ -147,6 +147,46 @@ export namespace FirebaseMessagingTypes {
|
|
147
147
|
* Options for features provided by the FCM SDK for Web.
|
148
148
|
*/
|
149
149
|
fcmOptions: FcmOptions;
|
150
|
+
|
151
|
+
/**
|
152
|
+
* Priority - android-specific, undefined on non-android platforms, default PRIORITY_UNKNOWN
|
153
|
+
*/
|
154
|
+
priority?: MessagePriority;
|
155
|
+
|
156
|
+
/**
|
157
|
+
* Original priority - android-specific, undefined on non-android platforms, default PRIORITY_UNKNOWN
|
158
|
+
*/
|
159
|
+
originalPriority?: MessagePriority;
|
160
|
+
}
|
161
|
+
|
162
|
+
/**
|
163
|
+
* Represents the priority of a RemoteMessage
|
164
|
+
*
|
165
|
+
* Note: this is an android-specific property of RemoteMessages
|
166
|
+
*
|
167
|
+
* See https://github.com/firebase/firebase-android-sdk/blob/b6d01070d246b74f02c42da5691f99f52763e48b/firebase-messaging/src/main/java/com/google/firebase/messaging/RemoteMessage.java#L57-L64
|
168
|
+
*
|
169
|
+
* Example:
|
170
|
+
*
|
171
|
+
* ```js
|
172
|
+
* firebase.messaging.MessagePriority.PRIORITY_NORMAL;
|
173
|
+
* ```
|
174
|
+
*/
|
175
|
+
export enum MessagePriority {
|
176
|
+
/**
|
177
|
+
* Unknown priority, this will be returned as the default on non-android platforms
|
178
|
+
*/
|
179
|
+
PRIORITY_UNKNOWN = 0,
|
180
|
+
|
181
|
+
/**
|
182
|
+
* High priority - Activities may start foreground services if they receive high priority messages
|
183
|
+
*/
|
184
|
+
PRIORITY_HIGH = 1,
|
185
|
+
|
186
|
+
/**
|
187
|
+
* Normal priority - Activities have restrictions and may only perform unobtrusive actions on receipt
|
188
|
+
*/
|
189
|
+
PRIORITY_NORMAL = 2,
|
150
190
|
}
|
151
191
|
|
152
192
|
/**
|
package/lib/version.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
// Generated by genversion.
|
2
|
-
module.exports = '21.
|
2
|
+
module.exports = '21.1.0';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@react-native-firebase/messaging",
|
3
|
-
"version": "21.
|
3
|
+
"version": "21.1.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",
|
@@ -24,7 +24,7 @@
|
|
24
24
|
"messaging"
|
25
25
|
],
|
26
26
|
"peerDependencies": {
|
27
|
-
"@react-native-firebase/app": "21.
|
27
|
+
"@react-native-firebase/app": "21.1.0",
|
28
28
|
"expo": ">=47.0.0"
|
29
29
|
},
|
30
30
|
"devDependencies": {
|
@@ -38,5 +38,5 @@
|
|
38
38
|
"publishConfig": {
|
39
39
|
"access": "public"
|
40
40
|
},
|
41
|
-
"gitHead": "
|
41
|
+
"gitHead": "601e38eadaab4079ab44562e537fd28a1d216ce7"
|
42
42
|
}
|