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
5 changes: 5 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ export interface PushNotification {
*/
getUserText(): string | undefined;

/**
* Gets the complete notification payload including aps and all custom fields
*/
getFullPayload(): Record<string, any>;

/**
* iOS Only
* Signifies remote notification handling is complete
Expand Down
8 changes: 8 additions & 0 deletions js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,7 @@ class PushNotificationIOS {
*/
constructor(nativeNotif: Object) {
this._data = {};
this._fullPayload = nativeNotif; // Store the complete payload
this._remoteNotificationCompleteCallbackCalled = false;
this._isRemote = nativeNotif.remote;
if (this._isRemote) {
Expand Down Expand Up @@ -643,6 +644,13 @@ class PushNotificationIOS {
getUserText(): ?string {
return this._userText;
}

/**
* Gets the complete notification payload including aps and all custom fields
*/
getFullPayload(): ?Object {
return this._fullPayload;
}
}

export default PushNotificationIOS;