diff --git a/schneiderbot_twitter.py b/schneiderbot_twitter.py index fd235be..6f81008 100644 --- a/schneiderbot_twitter.py +++ b/schneiderbot_twitter.py @@ -34,7 +34,7 @@ def check_pepito_and_post_auto(bot, update): api = get_twitter_instance() current_status = api.GetUserTimeline(pepito_id)[0] global last_status - if last_status != current_status: + if last_status == None or last_status.AsDict()['id'] != current_status.AsDict()['id']: for group_id in pepito_groups: bot.send_message(chat_id=group_id, text=current_status.AsDict()['text']) last_status = current_status @@ -44,7 +44,8 @@ def check_pepito_and_post_manually(bot, update): api = get_twitter_instance() current_status = api.GetUserTimeline(pepito_id)[0] global last_status - if last_status != current_status: + + if last_status.AsDict()['id'] != current_status.AsDict()['id']: for group_id in pepito_groups: bot.send_message(chat_id=group_id, text=current_status.AsDict()['text']) last_status = current_status