From efeefc4d0eb2bc5e2116952222f00e7ab8f80b64 Mon Sep 17 00:00:00 2001 From: Niels Andriesse Date: Mon, 3 Feb 2020 14:52:15 +1100 Subject: [PATCH] Fix RSS feed parsing --- SignalServiceKit/src/Loki/API/LokiRSSFeedProxy.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SignalServiceKit/src/Loki/API/LokiRSSFeedProxy.swift b/SignalServiceKit/src/Loki/API/LokiRSSFeedProxy.swift index 9c28f352f..12a9732b0 100644 --- a/SignalServiceKit/src/Loki/API/LokiRSSFeedProxy.swift +++ b/SignalServiceKit/src/Loki/API/LokiRSSFeedProxy.swift @@ -19,7 +19,7 @@ public enum LokiRSSFeedProxy { let url = URL(string: server + "/" + endpoint)! let request = TSRequest(url: url) return LokiFileServerProxy(for: server).perform(request).map { response -> String in - guard let data = response as? Data, let json = try? JSONSerialization.jsonObject(with: data, options: []) as? JSON, let xml = json["data"] as? String else { throw Error.proxyResponseParsingFailed } + guard let json = response as? JSON, let xml = json["data"] as? String else { throw Error.proxyResponseParsingFailed } return xml } }