Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(firebase_messaging): Retrieve messageId from MessagePayload received on message event for Web platform. #7846

Merged
merged 2 commits into from Nov 30, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -91,6 +91,7 @@ class MessagePayload
MessagePayload._fromJsObject(messaging_interop.MessagePayloadJsImpl jsObject)
: super.fromJsObject(jsObject);

String get messageId => jsObject.messageId;
String? get collapseKey => jsObject.collapseKey;
FcmOptions? get fcmOptions => jsObject.fcmOptions == null
? null
Expand Down
Expand Up @@ -35,6 +35,7 @@ abstract class NotificationPayloadJsImpl {
@JS()
@anonymous
abstract class MessagePayloadJsImpl {
external String get messageId;
external String? get collapseKey;
external FcmOptionsJsImpl? get fcmOptions;
external NotificationPayloadJsImpl? get notification;
Expand Down
Expand Up @@ -72,7 +72,7 @@ Map<String, dynamic> messagePayloadToMap(MessagePayload messagePayload) {
'contentAvailable': null,
'data': data,
'from': messagePayload.from,
'messageId': null,
'messageId': messagePayload.messageId,
'mutableContent': null,
'notification': messagePayload.notification == null
? null
Expand Down