From fb732204386935fa14ae98d1b468c9a62f805200 Mon Sep 17 00:00:00 2001 From: Niloth P <20315308+Niloth-p@users.noreply.github.com> Date: Fri, 1 Nov 2024 13:21:53 +0530 Subject: [PATCH] rss-bot: Handle feed entries that lack a `title` field. Fixes #836. --- zulip/integrations/rss/rss-bot | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zulip/integrations/rss/rss-bot b/zulip/integrations/rss/rss-bot index fd0db73db..49c82fb62 100755 --- a/zulip/integrations/rss/rss-bot +++ b/zulip/integrations/rss/rss-bot @@ -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("$", "$$")