Fix error on titles > 256 characters
This commit is contained in:
parent
7876ba0051
commit
44bb91ad6d
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue