# HG changeset patch # User Mikael Berthe # Date 1179657235 -7200 # Node ID ca6e989ca8500e5901a1d1ea3d9b261cf50467f6 # Parent 0d917adf0daf45482bde4baa7d6426f5dc7559f0 rss_plugin: Don't send title if it's part of the headline description diff -r 0d917adf0daf -r ca6e989ca850 plugins/rss_plugin.py --- a/plugins/rss_plugin.py Sun May 20 09:56:47 2007 +0200 +++ b/plugins/rss_plugin.py Sun May 20 12:33:55 2007 +0200 @@ -126,9 +126,16 @@ title = rss_remove_html(item['title']) link = item['link'] description = rss_remove_html(item['description']) - reply = title + ' - ' - if description: - reply += description + ' - ' + # Don't send title if it's part of the description (for example in + # Mercurial's changesets). + if not description: + reply = title + '\n' + else: + if description.startswith(title): + reply = '' + else: + reply = title + ' - ' + reply += description + '\n' reply += link for groupchat in RSS_CACHE['channels'][channel]['subscribers']: if GROUPCHATS.has_key(groupchat):