Skip to content

Commit

Permalink
[MOB-9233] Updated code according to the new discussion
Browse files Browse the repository at this point in the history
  • Loading branch information
sumeruchat committed Jan 7, 2025
1 parent b467ad7 commit 448d07d
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions swift-sdk/Internal/in-app/InAppPersistence.swift
Original file line number Diff line number Diff line change
Expand Up @@ -282,17 +282,17 @@ extension IterableInAppMessage: Codable {
let priorityLevel = (try? container.decode(Double.self, forKey: .priorityLevel)) ?? Const.PriorityLevel.unassigned

self.init(messageId: messageId,
campaignId: campaignId,
trigger: trigger,
createdAt: createdAt,
expiresAt: expiresAt,
content: content,
saveToInbox: saveToInbox && jsonOnly != 1,
inboxMetadata: inboxMetadata,
customPayload: customPayload,
read: read,
priorityLevel: priorityLevel,
jsonOnly: jsonOnly == 1)
campaignId: campaignId,
trigger: trigger,
createdAt: createdAt,
expiresAt: expiresAt,
content: content,
saveToInbox: saveToInbox && jsonOnly != 1,
inboxMetadata: inboxMetadata,
customPayload: customPayload,
read: read,
priorityLevel: priorityLevel,
jsonOnly: jsonOnly == 1)

self.didProcessTrigger = didProcessTrigger
self.consumed = consumed
Expand Down Expand Up @@ -364,6 +364,7 @@ extension IterableInAppMessage: Codable {

guard let contentContainer = try? container.nestedContainer(keyedBy: ContentCodingKeys.self, forKey: .content) else {
ITBError()

return createDefaultContent()
}

Expand Down

0 comments on commit 448d07d

Please sign in to comment.