Skip to content

Commit

Permalink
Merge pull request #1736 from OneSignal/user-model/raw-payload
Browse files Browse the repository at this point in the history
[User Model] Expose `INotification.rawPayload`
  • Loading branch information
brismithers authored and jinliu9508 committed Jan 31, 2024
2 parents a7ab322 + 0a9ef1c commit 6ad41b8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,12 @@ interface INotification {
*/
val groupedNotifications: List<INotification>?

/**
* The raw payload of the notification that can into the device. This should only be used to
* access any data that is not yet represented in a property.
*/
val rawPayload: String?

/**
* Create a mutable copy of this notification. Typically used in [IRemoteNotificationReceivedHandler]
* or [INotificationWillShowInForegroundHandler] to modify an incoming notification prior to it
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ open class Notification : INotification {
override var sentTime: Long = 0
override var ttl = 0

var rawPayload: String? = null
override var rawPayload: String? = null

constructor() {}
constructor(payload: JSONObject, time: ITime) : this(null, payload, 0, time) {}
Expand Down

0 comments on commit 6ad41b8

Please sign in to comment.