Skip to content

Commit fb73220

Browse files
Niloth-ptimabbott
authored andcommitted
rss-bot: Handle feed entries that lack a title field.
Fixes #836.
1 parent c04a172 commit fb73220

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

zulip/integrations/rss/rss-bot

+2-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,8 @@ def send_zulip(entry: Any, feed_name: str) -> Dict[str, Any]:
177177
if opts.unwrap:
178178
body = unwrap_text(body)
179179

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

182183
if opts.math:
183184
content = content.replace("$", "$$")

0 commit comments

Comments
 (0)