File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
packages/firebase_messaging
firebase_messaging_platform_interface/lib/src
firebase_messaging/ios/firebase_messaging/Sources/firebase_messaging Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -370,8 +370,11 @@ - (void)userNotificationCenter:(UNUserNotificationCenter *)center
370
370
// coming from a terminated state.
371
371
if (_notificationOpenedAppID != nil &&
372
372
![_initialNotificationID isEqualToString: _notificationOpenedAppID]) {
373
- NSDictionary *notificationDict =
374
- [FLTFirebaseMessagingPlugin remoteMessageUserInfoToDict: remoteNotification];
373
+ NSMutableDictionary *notificationDict =
374
+ [[FLTFirebaseMessagingPlugin remoteMessageUserInfoToDict: remoteNotification] mutableCopy ];
375
+ if (response.actionIdentifier != nil ) {
376
+ notificationDict[@" actionIdentifier" ] = response.actionIdentifier ;
377
+ }
375
378
[_channel invokeMethod: @" Messaging#onMessageOpenedApp" arguments: notificationDict];
376
379
}
377
380
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ class RemoteMessage {
11
11
const RemoteMessage (
12
12
{this .senderId,
13
13
this .category,
14
+ this .actionIdentifier,
14
15
this .collapseKey,
15
16
this .contentAvailable = false ,
16
17
this .data = const < String , dynamic > {},
@@ -28,6 +29,7 @@ class RemoteMessage {
28
29
return RemoteMessage (
29
30
senderId: map['senderId' ],
30
31
category: map['category' ],
32
+ actionIdentifier: map['actionIdentifier' ],
31
33
collapseKey: map['collapseKey' ],
32
34
contentAvailable: map['contentAvailable' ] ?? false ,
33
35
data: map['data' ] == null
@@ -77,6 +79,9 @@ class RemoteMessage {
77
79
/// The iOS category this notification is assigned to.
78
80
final String ? category;
79
81
82
+ /// The iOS action identifier for the category
83
+ final String ? actionIdentifier;
84
+
80
85
/// The collapse key a message was sent with. Used to override existing messages with the same key.
81
86
final String ? collapseKey;
82
87
You can’t perform that action at this time.
0 commit comments