Fixed a bug with long tweets when posting

This commit is contained in:
Manuel Cortez 2016-07-19 09:06:43 -05:00
parent f9d869e824
commit 695b35031e

View File

@ -141,7 +141,7 @@ class bufferController(object):
text = twishort.create_tweet(self.session.settings["twitter"]["user_key"], self.session.settings["twitter"]["user_secret"], text)
else:
text = twishort.create_tweet(self.session.settings["twitter"]["user_key"], self.session.settings["twitter"]["user_secret"], text, 1)
if not hasattr(tweet, "attachments"):
if not hasattr(tweet, "attachments") or len(tweet.attachments) == 0:
call_threaded(self.session.api_call, call_name="update_status", status=text)
else:
call_threaded(self.post_with_media, text=text, attachments=tweet.attachments)