From 0328e248243c091efbfef06d6b4370ae08107cbe Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Thu, 29 Nov 2007 14:57:11 +0000 Subject: [PATCH] rss plugin: calculate item_uid_for_bot() on Atom feeds without breaking --- data/rbot/plugins/rss.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/data/rbot/plugins/rss.rb b/data/rbot/plugins/rss.rb index 2689b3c3..c9231dad 100644 --- a/data/rbot/plugins/rss.rb +++ b/data/rbot/plugins/rss.rb @@ -24,8 +24,13 @@ module ::RSS # def RSS.item_uid_for_bot(item, opts={}) options = { :show_updated => true}.merge(opts) - desc = options[:show_updated] ? item.description : nil - [item.title, item.link, desc].hash + desc = nil + if options[:show_updated] + desc = item.content.content rescue item.description rescue nil + end + [(item.title.content rescue item.title rescue nil), + (item.link.href rescue item.link), + desc].hash end # Add support for Slashdot namespace in RDF. The code is just an adaptation -- 2.39.2