Fix error on titles > 256 characters

This commit is contained in:
Zeva Rose 2022-06-10 12:29:22 -06:00
parent 7876ba0051
commit 44bb91ad6d

View file

@ -39,7 +39,9 @@ async def post_embeds(sub: Sub, post: Submission, reddit: Reddit) -> Optional[Li
author_url = f"https://reddit.com/u/{post.author.name}"
author_icon = post.author.icon_img
images = []
title = f"{post.title}"
title = post.title
if len(title) > 256:
title = title[253] + "..."
fields = []
content = ""
og_post = None