Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,12 @@ - (void)userNotificationCenter:(UNUserNotificationCenter *)center
// coming from a terminated state.
if (_notificationOpenedAppID != nil &&
![_initialNotificationID isEqualToString:_notificationOpenedAppID]) {
NSDictionary *notificationDict =
[FLTFirebaseMessagingPlugin remoteMessageUserInfoToDict:remoteNotification];
NSMutableDictionary *notificationDict =
[[FLTFirebaseMessagingPlugin remoteMessageUserInfoToDict:remoteNotification] mutableCopy];
if (response.actionIdentifier != nil) {
// message.actionIdentifier
notificationDict[@"actionIdentifier"] = response.actionIdentifier;
}
[_channel invokeMethod:@"Messaging#onMessageOpenedApp" arguments:notificationDict];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class RemoteMessage {
const RemoteMessage(
{this.senderId,
this.category,
this.actionIdentifier,
this.collapseKey,
this.contentAvailable = false,
this.data = const <String, dynamic>{},
Expand All @@ -28,6 +29,7 @@ class RemoteMessage {
return RemoteMessage(
senderId: map['senderId'],
category: map['category'],
actionIdentifier: map['actionIdentifier'],
collapseKey: map['collapseKey'],
contentAvailable: map['contentAvailable'] ?? false,
data: map['data'] == null
Expand Down Expand Up @@ -77,6 +79,9 @@ class RemoteMessage {
/// The iOS category this notification is assigned to.
final String? category;

/// The iOS action identifier for the category
final String? actionIdentifier;

/// The collapse key a message was sent with. Used to override existing messages with the same key.
final String? collapseKey;

Expand Down