rss-bot: Handle feed entries that lack a title field.

Fixes #836.
This commit is contained in:
Niloth P 2024-11-01 13:21:53 +05:30 committed by Tim Abbott
parent c04a17255b
commit fb73220438

View file

@ -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("$", "$$")