Jump to top

RemoteMessage

interface

The RemoteMessage interface describes an outgoing & incoming message from the remote FCM server.

Properties

category

</>

The iOS category this notification is assigned to.

category: undefined | string;

collapseKey

</>

The collapse key a message was sent with. Used to override existing messages with the same key.

collapseKey: undefined | string;

contentAvailable

</>

Whether the iOS APNs message was configured as a background update notification.

contentAvailable: undefined | false | true;

data

</>

Any additional data sent with the message.

data: undefined | { [key: string]: string };

fcmOptions

</>

Options for features provided by the FCM SDK for Web.

fcmOptions: FcmOptions;

from

</>

The topic name or message identifier.

from: undefined | string;

messageId

</>

A unique ID assigned to every message.

messageId: undefined | string;

messageType

</>

The message type of the message.

messageType: undefined | string;

mutableContent

</>

Whether the iOS APNs mutable-content property on the message was set allowing the app to modify the notification via app extensions.

mutableContent: undefined | false | true;

notification

</>

Additional NotificationPayload data sent with the message

notification: NotificationPayload;

sentTime

</>

The time the message was sent, in milliseconds since the start of unix epoch

sentTime: undefined | number;

threadId

</>

An iOS app specific identifier used for notification grouping. threadId?: string;

threadId: undefined | string;

to

</>

The address for the message.

to: undefined | string;

ttl

</>

The time to live for the message in seconds.

ttl: undefined | number;