diff --git a/Pachyderm/Model/Attachment.swift b/Pachyderm/Model/Attachment.swift index f71a35fa24..cc376dff25 100644 --- a/Pachyderm/Model/Attachment.swift +++ b/Pachyderm/Model/Attachment.swift @@ -13,7 +13,7 @@ public class Attachment: Codable { public let kind: Kind public let url: URL public let remoteURL: URL? - public let previewURL: URL + public let previewURL: URL? public let textURL: URL? public let meta: Metadata? public let description: String? @@ -30,11 +30,11 @@ public class Attachment: Codable { self.id = try container.decode(String.self, forKey: .id) self.kind = try container.decode(Kind.self, forKey: .kind) self.url = try container.decode(URL.self, forKey: .url) - self.previewURL = try container.decode(URL.self, forKey: .previewURL) - self.remoteURL = try? container.decode(URL.self, forKey: .remoteURL) - self.textURL = try? container.decode(URL.self, forKey: .textURL) - self.meta = try? container.decode(Metadata.self, forKey: .meta) - self.description = try? container.decode(String.self, forKey: .description) + self.previewURL = try? container.decode(URL?.self, forKey: .previewURL) + self.remoteURL = try? container.decode(URL?.self, forKey: .remoteURL) + self.textURL = try? container.decode(URL?.self, forKey: .textURL) + self.meta = try? container.decode(Metadata?.self, forKey: .meta) + self.description = try? container.decode(String?.self, forKey: .description) } private enum CodingKeys: String, CodingKey {