Skip to content

Commit 964ab9f

Browse files
authored
Merge pull request #1736 from OneSignal/user-model/raw-payload
[User Model] Expose `INotification.rawPayload`
2 parents 8499e90 + 3f2060f commit 964ab9f

File tree

2 files changed

+7
-1
lines changed
  • OneSignalSDK/onesignal

2 files changed

+7
-1
lines changed

OneSignalSDK/onesignal/core/src/main/java/com/onesignal/notifications/INotification.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,12 @@ interface INotification {
132132
*/
133133
val groupedNotifications: List<INotification>?
134134

135+
/**
136+
* The raw payload of the notification that can into the device. This should only be used to
137+
* access any data that is not yet represented in a property.
138+
*/
139+
val rawPayload: String?
140+
135141
/**
136142
* Create a mutable copy of this notification. Typically used in [IRemoteNotificationReceivedHandler]
137143
* or [INotificationWillShowInForegroundHandler] to modify an incoming notification prior to it

OneSignalSDK/onesignal/notifications/src/main/java/com/onesignal/notifications/internal/Notification.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ open class Notification : INotification {
5151
override var sentTime: Long = 0
5252
override var ttl = 0
5353

54-
var rawPayload: String? = null
54+
override var rawPayload: String? = null
5555

5656
constructor() {}
5757
constructor(payload: JSONObject, time: ITime) : this(null, payload, 0, time) {}

0 commit comments

Comments
 (0)