Fix error decoding statuses on Calckey lacking emojis

This commit is contained in:
Shadowfacts 2023-05-10 10:13:34 -04:00
parent 822c2e0fa2
commit 671a8e0cb3

View File

@ -64,7 +64,7 @@ public final class Status: StatusProtocol, Decodable, Sendable {
self.reblog = try container.decodeIfPresent(Status.self, forKey: .reblog)
self.content = try container.decode(String.self, forKey: .content)
self.createdAt = try container.decode(Date.self, forKey: .createdAt)
self.emojis = try container.decode([Emoji].self, forKey: .emojis)
self.emojis = try container.decodeIfPresent([Emoji].self, forKey: .emojis) ?? []
self.reblogsCount = try container.decode(Int.self, forKey: .reblogsCount)
self.favouritesCount = try container.decode(Int.self, forKey: .favouritesCount)
self.reblogged = try container.decodeIfPresent(Bool.self, forKey: .reblogged)