diff --git a/Packages/Pachyderm/Sources/Pachyderm/Model/Poll.swift b/Packages/Pachyderm/Sources/Pachyderm/Model/Poll.swift index d1c7a66386..29d46bd52a 100644 --- a/Packages/Pachyderm/Sources/Pachyderm/Model/Poll.swift +++ b/Packages/Pachyderm/Sources/Pachyderm/Model/Poll.swift @@ -16,7 +16,7 @@ public struct Poll: Codable, Sendable { public let votesCount: Int public let votersCount: Int? public let voted: Bool? - public let ownVotes: [Int]? + public let ownVotes: [Int?]? public let options: [Option] public let emojis: [Emoji] @@ -33,7 +33,7 @@ public struct Poll: Codable, Sendable { self.votesCount = try container.decode(Int.self, forKey: .votesCount) self.votersCount = try container.decodeIfPresent(Int.self, forKey: .votersCount) self.voted = try container.decodeIfPresent(Bool.self, forKey: .voted) - self.ownVotes = try container.decodeIfPresent([Int].self, forKey: .ownVotes) + self.ownVotes = try container.decodeIfPresent([Int?].self, forKey: .ownVotes) self.options = try container.decode([Poll.Option].self, forKey: .options) self.emojis = try container.decodeIfPresent([Emoji].self, forKey: .emojis) ?? [] }