equal
deleted
inserted
replaced
124 global RSS_CACHE |
124 global RSS_CACHE |
125 globaltitle = RSS_CACHE['channels'][channel]['title'] |
125 globaltitle = RSS_CACHE['channels'][channel]['title'] |
126 title = rss_remove_html(item['title']) |
126 title = rss_remove_html(item['title']) |
127 link = item['link'] |
127 link = item['link'] |
128 description = rss_remove_html(item['description']) |
128 description = rss_remove_html(item['description']) |
129 reply = title + ' - ' |
129 # Don't send title if it's part of the description (for example in |
130 if description: |
130 # Mercurial's changesets). |
131 reply += description + ' - ' |
131 if not description: |
|
132 reply = title + '\n' |
|
133 else: |
|
134 if description.startswith(title): |
|
135 reply = '' |
|
136 else: |
|
137 reply = title + ' - ' |
|
138 reply += description + '\n' |
132 reply += link |
139 reply += link |
133 for groupchat in RSS_CACHE['channels'][channel]['subscribers']: |
140 for groupchat in RSS_CACHE['channels'][channel]['subscribers']: |
134 if GROUPCHATS.has_key(groupchat): |
141 if GROUPCHATS.has_key(groupchat): |
135 print channel + ': Sending Headline To: ' + groupchat |
142 print channel + ': Sending Headline To: ' + groupchat |
136 msg(groupchat, reply) |
143 msg(groupchat, reply) |