mirror of
https://gitlab.com/chaica/feed2toot.git
synced 2024-11-23 20:11:09 +00:00
fix truncate messages
This commit is contained in:
parent
b7430f3b10
commit
976fc03224
|
@ -48,6 +48,7 @@ def build_message(entrytosend, tweetformat, rss, tootmaxlen, notagsintoot):
|
|||
finaltweet = BeautifulSoup(finaltweet, 'html.parser').get_text()
|
||||
# truncate toot to user-defined value whatever the content is
|
||||
if len(finaltweet) > tootmaxlen:
|
||||
finaltweet = finaltweet[0:tootmaxlen-1]
|
||||
return ''.join([finaltweet[0:-3], '...'])
|
||||
else:
|
||||
return finaltweet
|
||||
|
|
Loading…
Reference in New Issue
Block a user