From ed2e53bb068246205e2c3fc1fd985a54859fcad7 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Thu, 2 Jan 2014 14:29:27 -0500 Subject: [PATCH] FIX: Support feeds with `description` as well as `content` --- app/jobs/scheduled/poll_feed.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/jobs/scheduled/poll_feed.rb b/app/jobs/scheduled/poll_feed.rb index 2c8d9eb34..8909c9987 100644 --- a/app/jobs/scheduled/poll_feed.rb +++ b/app/jobs/scheduled/poll_feed.rb @@ -32,8 +32,10 @@ module Jobs url = i.link url = i.id if url.blank? || url !~ /^https?\:\/\// - content = CGI.unescapeHTML(i.content.scrub) - TopicEmbed.import(user, url, i.title, content) + content = i.content || i.description + if content + TopicEmbed.import(user, url, i.title, CGI.unescapeHTML(content.scrub)) + end end end