From 54c9f64614520479d980b599fa05213cab34751e Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Sun, 25 Oct 2020 20:33:29 -0500 Subject: [PATCH] Fix status sending bug --- Account/Sources/Account/ReaderAPI/ReaderAPICaller.swift | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Account/Sources/Account/ReaderAPI/ReaderAPICaller.swift b/Account/Sources/Account/ReaderAPI/ReaderAPICaller.swift index 0faa7d780..2cd3ab024 100644 --- a/Account/Sources/Account/ReaderAPI/ReaderAPICaller.swift +++ b/Account/Sources/Account/ReaderAPI/ReaderAPICaller.swift @@ -861,12 +861,13 @@ final class ReaderAPICaller: NSObject { request.httpMethod = "POST" // Get ids from above into hex representation of value - let idsToFetch = entries.map({ idValue -> String in + let idsToFetch = entries.compactMap({ idValue -> String? in if self.variant == .theOldReader { return "i=tag:google.com,2005:reader/item/\(idValue)" } else { - let idHexString = String(format: "%.16llx", idValue) - return "i=\(idHexString)" + guard let intValue = Int(idValue) else { return nil } + let idHexString = String(format: "%.16llx", intValue) + return "i=tag:google.com,2005:reader/item/\(idHexString)" } }).joined(separator:"&")