From 8672b78d69875edaa17d02298c1b41310f7b9b8e Mon Sep 17 00:00:00 2001 From: makeworld Date: Thu, 17 Dec 2020 12:00:34 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Detect=20feed=20for=20any=20XML?= =?UTF-8?q?=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- subscriptions/subscriptions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subscriptions/subscriptions.go b/subscriptions/subscriptions.go index 76de80f..757310f 100644 --- a/subscriptions/subscriptions.go +++ b/subscriptions/subscriptions.go @@ -115,7 +115,7 @@ func GetFeed(mediatype, filename string, r io.Reader) (*gofeed.Feed, bool) { // Check mediatype and filename if mediatype != "application/atom+xml" && mediatype != "application/rss+xml" && mediatype != "application/json+feed" && filename != "atom.xml" && filename != "feed.xml" && filename != "feed.json" && - !strings.HasSuffix(filename, ".atom") && !strings.HasSuffix(filename, ".rss") { + !strings.HasSuffix(filename, ".atom") && !strings.HasSuffix(filename, ".rss") && !strings.HasSuffix(filename, ".xml") { // No part of the above is true return nil, false }