Skip to content

Commit

Permalink
rss-bot: Handle feed entries that lack a title field.
Browse files Browse the repository at this point in the history
Fixes #836.
  • Loading branch information
Niloth-p authored and timabbott committed Nov 1, 2024
1 parent c04a172 commit fb73220
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion zulip/integrations/rss/rss-bot
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ def send_zulip(entry: Any, feed_name: str) -> Dict[str, Any]:
if opts.unwrap:
body = unwrap_text(body)

content = f"**[{entry.title}]({entry.link})**\n{strip_tags(body)}\n{entry.link}"
title = f"**[{entry.title}]({entry.link})**\n" if hasattr(entry, "title") else ""
content = f"{title}{strip_tags(body)}\n{entry.link}"

if opts.math:
content = content.replace("$", "$$")
Expand Down

0 comments on commit fb73220

Please sign in to comment.