Skip to content

Commit

Permalink
Fix parsing of reference ID from JSON
Browse files Browse the repository at this point in the history
Signed-off-by: Danny Baumann <[email protected]>
  • Loading branch information
maniac103 committed Jul 10, 2024
1 parent d7f41fa commit 13f12d1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ fun JSONObject.toCloudNotification(): CloudNotification {

val payload = optJSONObject("payload")
return CloudNotification(
id = CloudNotificationId(getString("_id"), optStringOrNull("reference-id")),
id = CloudNotificationId(getString("_id"), payload?.optStringOrNull("reference-id")),
title = payload?.optString("title").orEmpty(),
message = payload?.getString("message") ?: getString("message"),
createdTimestamp = created,
Expand Down

0 comments on commit 13f12d1

Please sign in to comment.