fix truncate messages
This commit is contained in:
parent
b7430f3b10
commit
976fc03224
1 changed files with 1 additions and 0 deletions
|
@ -48,6 +48,7 @@ def build_message(entrytosend, tweetformat, rss, tootmaxlen, notagsintoot):
|
||||||
finaltweet = BeautifulSoup(finaltweet, 'html.parser').get_text()
|
finaltweet = BeautifulSoup(finaltweet, 'html.parser').get_text()
|
||||||
# truncate toot to user-defined value whatever the content is
|
# truncate toot to user-defined value whatever the content is
|
||||||
if len(finaltweet) > tootmaxlen:
|
if len(finaltweet) > tootmaxlen:
|
||||||
|
finaltweet = finaltweet[0:tootmaxlen-1]
|
||||||
return ''.join([finaltweet[0:-3], '...'])
|
return ''.join([finaltweet[0:-3], '...'])
|
||||||
else:
|
else:
|
||||||
return finaltweet
|
return finaltweet
|
||||||
|
|
Loading…
Reference in a new issue